Loading core/java/android/app/ActivityThread.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -3393,6 +3393,9 @@ public final class ActivityThread extends ClientTransactionHandler { } } WindowManagerGlobal.initialize(); WindowManagerGlobal.initialize(); // Hint the GraphicsEnvironment that an activity is launching on the process. GraphicsEnvironment.hintActivityLaunch(); final Activity a = performLaunchActivity(r, customIntent); final Activity a = performLaunchActivity(r, customIntent); if (a != null) { if (a != null) { Loading core/java/android/os/GraphicsEnvironment.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -107,6 +107,12 @@ public class GraphicsEnvironment { Trace.traceEnd(Trace.TRACE_TAG_GRAPHICS); Trace.traceEnd(Trace.TRACE_TAG_GRAPHICS); } } /** * Hint for GraphicsEnvironment that an activity is launching on the process. * Then the app process is allowed to send stats to GpuStats module. */ public static native void hintActivityLaunch(); /** /** * Allow to query whether an application will use Game Driver. * Allow to query whether an application will use Game Driver. */ */ Loading core/jni/android_os_GraphicsEnvironment.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -85,6 +85,10 @@ void setDebugLayersGLES_native(JNIEnv* env, jobject clazz, jstring layers) { } } } } void hintActivityLaunch_native(JNIEnv* env, jobject clazz) { android::GraphicsEnv::getInstance().hintActivityLaunch(); } const JNINativeMethod g_methods[] = { const JNINativeMethod g_methods[] = { { "getCanLoadSystemLibraries", "()I", reinterpret_cast<void*>(getCanLoadSystemLibraries_native) }, { "getCanLoadSystemLibraries", "()I", reinterpret_cast<void*>(getCanLoadSystemLibraries_native) }, { "setDriverPathAndSphalLibraries", "(Ljava/lang/String;Ljava/lang/String;)V", reinterpret_cast<void*>(setDriverPathAndSphalLibraries_native) }, { "setDriverPathAndSphalLibraries", "(Ljava/lang/String;Ljava/lang/String;)V", reinterpret_cast<void*>(setDriverPathAndSphalLibraries_native) }, Loading @@ -94,6 +98,7 @@ const JNINativeMethod g_methods[] = { { "setLayerPaths", "(Ljava/lang/ClassLoader;Ljava/lang/String;)V", reinterpret_cast<void*>(setLayerPaths_native) }, { "setLayerPaths", "(Ljava/lang/ClassLoader;Ljava/lang/String;)V", reinterpret_cast<void*>(setLayerPaths_native) }, { "setDebugLayers", "(Ljava/lang/String;)V", reinterpret_cast<void*>(setDebugLayers_native) }, { "setDebugLayers", "(Ljava/lang/String;)V", reinterpret_cast<void*>(setDebugLayers_native) }, { "setDebugLayersGLES", "(Ljava/lang/String;)V", reinterpret_cast<void*>(setDebugLayersGLES_native) }, { "setDebugLayersGLES", "(Ljava/lang/String;)V", reinterpret_cast<void*>(setDebugLayersGLES_native) }, { "hintActivityLaunch", "()V", reinterpret_cast<void*>(hintActivityLaunch_native) }, }; }; const char* const kGraphicsEnvironmentName = "android/os/GraphicsEnvironment"; const char* const kGraphicsEnvironmentName = "android/os/GraphicsEnvironment"; Loading Loading
core/java/android/app/ActivityThread.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -3393,6 +3393,9 @@ public final class ActivityThread extends ClientTransactionHandler { } } WindowManagerGlobal.initialize(); WindowManagerGlobal.initialize(); // Hint the GraphicsEnvironment that an activity is launching on the process. GraphicsEnvironment.hintActivityLaunch(); final Activity a = performLaunchActivity(r, customIntent); final Activity a = performLaunchActivity(r, customIntent); if (a != null) { if (a != null) { Loading
core/java/android/os/GraphicsEnvironment.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -107,6 +107,12 @@ public class GraphicsEnvironment { Trace.traceEnd(Trace.TRACE_TAG_GRAPHICS); Trace.traceEnd(Trace.TRACE_TAG_GRAPHICS); } } /** * Hint for GraphicsEnvironment that an activity is launching on the process. * Then the app process is allowed to send stats to GpuStats module. */ public static native void hintActivityLaunch(); /** /** * Allow to query whether an application will use Game Driver. * Allow to query whether an application will use Game Driver. */ */ Loading
core/jni/android_os_GraphicsEnvironment.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -85,6 +85,10 @@ void setDebugLayersGLES_native(JNIEnv* env, jobject clazz, jstring layers) { } } } } void hintActivityLaunch_native(JNIEnv* env, jobject clazz) { android::GraphicsEnv::getInstance().hintActivityLaunch(); } const JNINativeMethod g_methods[] = { const JNINativeMethod g_methods[] = { { "getCanLoadSystemLibraries", "()I", reinterpret_cast<void*>(getCanLoadSystemLibraries_native) }, { "getCanLoadSystemLibraries", "()I", reinterpret_cast<void*>(getCanLoadSystemLibraries_native) }, { "setDriverPathAndSphalLibraries", "(Ljava/lang/String;Ljava/lang/String;)V", reinterpret_cast<void*>(setDriverPathAndSphalLibraries_native) }, { "setDriverPathAndSphalLibraries", "(Ljava/lang/String;Ljava/lang/String;)V", reinterpret_cast<void*>(setDriverPathAndSphalLibraries_native) }, Loading @@ -94,6 +98,7 @@ const JNINativeMethod g_methods[] = { { "setLayerPaths", "(Ljava/lang/ClassLoader;Ljava/lang/String;)V", reinterpret_cast<void*>(setLayerPaths_native) }, { "setLayerPaths", "(Ljava/lang/ClassLoader;Ljava/lang/String;)V", reinterpret_cast<void*>(setLayerPaths_native) }, { "setDebugLayers", "(Ljava/lang/String;)V", reinterpret_cast<void*>(setDebugLayers_native) }, { "setDebugLayers", "(Ljava/lang/String;)V", reinterpret_cast<void*>(setDebugLayers_native) }, { "setDebugLayersGLES", "(Ljava/lang/String;)V", reinterpret_cast<void*>(setDebugLayersGLES_native) }, { "setDebugLayersGLES", "(Ljava/lang/String;)V", reinterpret_cast<void*>(setDebugLayersGLES_native) }, { "hintActivityLaunch", "()V", reinterpret_cast<void*>(hintActivityLaunch_native) }, }; }; const char* const kGraphicsEnvironmentName = "android/os/GraphicsEnvironment"; const char* const kGraphicsEnvironmentName = "android/os/GraphicsEnvironment"; Loading