Game Driver: make GpuService the GpuStats holder
Move IGpuService to graphicsenv to avoid dependency circle. Add ATRACE
to GraphicsEnv. Implement the prototype SET_GPU_STATS IPC to collect
GpuStats from applications.
Bug: 123529932
Test: Build, flash and boot.
Change-Id: I7d76324c5adb6ad00f1e5420ab2c7f4067f33253
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 8a409ae..4cafe2b 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -255,6 +255,8 @@
LOG_ALWAYS_FATAL_IF(!cnx->libGles2 || !cnx->libGles1,
"couldn't load system OpenGL ES wrapper libraries");
+ android::GraphicsEnv::getInstance().sendGpuStats();
+
return (void*)hnd;
}