Loading core/java/android/view/ThreadedRenderer.java +6 −0 Original line number Diff line number Diff line Loading @@ -20,11 +20,13 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.app.ActivityManager; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.AnimatedVectorDrawable; import android.os.Build; import android.os.IBinder; import android.os.ParcelFileDescriptor; import android.os.RemoteException; Loading Loading @@ -1066,6 +1068,9 @@ public final class ThreadedRenderer { mInitialized = true; mAppContext = context.getApplicationContext(); nSetDebuggingEnabled( (mAppContext.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0 || Build.IS_DEBUGGABLE); initSched(renderProxy); initGraphicsStats(); } Loading Loading @@ -1194,4 +1199,5 @@ public final class ThreadedRenderer { private static native void nSetHighContrastText(boolean enabled); // For temporary experimentation b/66945974 private static native void nHackySetRTAnimationsEnabled(boolean enabled); private static native void nSetDebuggingEnabled(boolean enabled); } core/jni/android_view_ThreadedRenderer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -984,6 +984,10 @@ static void android_view_ThreadedRenderer_hackySetRTAnimationsEnabled(JNIEnv*, j Properties::enableRTAnimations = enable; } static void android_view_ThreadedRenderer_setDebuggingEnabled(JNIEnv*, jclass, jboolean enable) { Properties::debuggingEnabled = enable; } // ---------------------------------------------------------------------------- // FrameMetricsObserver // ---------------------------------------------------------------------------- Loading Loading @@ -1092,6 +1096,7 @@ static const JNINativeMethod gMethods[] = { { "nSetHighContrastText", "(Z)V", (void*)android_view_ThreadedRenderer_setHighContrastText }, { "nHackySetRTAnimationsEnabled", "(Z)V", (void*)android_view_ThreadedRenderer_hackySetRTAnimationsEnabled }, { "nSetDebuggingEnabled", "(Z)V", (void*)android_view_ThreadedRenderer_setDebuggingEnabled }, }; static JavaVM* mJvm = nullptr; Loading libs/hwui/Properties.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ bool Properties::skpCaptureEnabled = false; bool Properties::enableRTAnimations = true; bool Properties::runningInEmulator = false; bool Properties::debuggingEnabled = false; static int property_get_int(const char* key, int defaultValue) { char buf[PROPERTY_VALUE_MAX] = { Loading Loading @@ -134,8 +135,7 @@ bool Properties::load() { filterOutTestOverhead = property_get_bool(PROPERTY_FILTER_TEST_OVERHEAD, false); skpCaptureEnabled = property_get_bool("ro.debuggable", false) && property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false); skpCaptureEnabled = debuggingEnabled && property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false); runningInEmulator = property_get_bool(PROPERTY_QEMU_KERNEL, false); Loading libs/hwui/Properties.h +2 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,8 @@ public: static bool runningInEmulator; ANDROID_API static bool debuggingEnabled; private: static ProfileType sProfileType; static bool sDisableProfileBars; Loading Loading
core/java/android/view/ThreadedRenderer.java +6 −0 Original line number Diff line number Diff line Loading @@ -20,11 +20,13 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.app.ActivityManager; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.AnimatedVectorDrawable; import android.os.Build; import android.os.IBinder; import android.os.ParcelFileDescriptor; import android.os.RemoteException; Loading Loading @@ -1066,6 +1068,9 @@ public final class ThreadedRenderer { mInitialized = true; mAppContext = context.getApplicationContext(); nSetDebuggingEnabled( (mAppContext.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0 || Build.IS_DEBUGGABLE); initSched(renderProxy); initGraphicsStats(); } Loading Loading @@ -1194,4 +1199,5 @@ public final class ThreadedRenderer { private static native void nSetHighContrastText(boolean enabled); // For temporary experimentation b/66945974 private static native void nHackySetRTAnimationsEnabled(boolean enabled); private static native void nSetDebuggingEnabled(boolean enabled); }
core/jni/android_view_ThreadedRenderer.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -984,6 +984,10 @@ static void android_view_ThreadedRenderer_hackySetRTAnimationsEnabled(JNIEnv*, j Properties::enableRTAnimations = enable; } static void android_view_ThreadedRenderer_setDebuggingEnabled(JNIEnv*, jclass, jboolean enable) { Properties::debuggingEnabled = enable; } // ---------------------------------------------------------------------------- // FrameMetricsObserver // ---------------------------------------------------------------------------- Loading Loading @@ -1092,6 +1096,7 @@ static const JNINativeMethod gMethods[] = { { "nSetHighContrastText", "(Z)V", (void*)android_view_ThreadedRenderer_setHighContrastText }, { "nHackySetRTAnimationsEnabled", "(Z)V", (void*)android_view_ThreadedRenderer_hackySetRTAnimationsEnabled }, { "nSetDebuggingEnabled", "(Z)V", (void*)android_view_ThreadedRenderer_setDebuggingEnabled }, }; static JavaVM* mJvm = nullptr; Loading
libs/hwui/Properties.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ bool Properties::skpCaptureEnabled = false; bool Properties::enableRTAnimations = true; bool Properties::runningInEmulator = false; bool Properties::debuggingEnabled = false; static int property_get_int(const char* key, int defaultValue) { char buf[PROPERTY_VALUE_MAX] = { Loading Loading @@ -134,8 +135,7 @@ bool Properties::load() { filterOutTestOverhead = property_get_bool(PROPERTY_FILTER_TEST_OVERHEAD, false); skpCaptureEnabled = property_get_bool("ro.debuggable", false) && property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false); skpCaptureEnabled = debuggingEnabled && property_get_bool(PROPERTY_CAPTURE_SKP_ENABLED, false); runningInEmulator = property_get_bool(PROPERTY_QEMU_KERNEL, false); Loading
libs/hwui/Properties.h +2 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,8 @@ public: static bool runningInEmulator; ANDROID_API static bool debuggingEnabled; private: static ProfileType sProfileType; static bool sDisableProfileBars; Loading