summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread
diff options
context:
space:
mode:
author Tom Murphy <tomnom@google.com> 2024-07-25 12:50:46 +0000
committer Tom Murphy <tomnom@google.com> 2024-08-09 12:27:11 +0000
commit102ba1284e1ebcd4989b25dea429306af8f10349 (patch)
tree97d314657196e27d102c999fd1e95c357b2ad3d4 /libs/hwui/renderthread
parent948ce5eb667b05bd69069c42a3101e58490215fa (diff)
Skip eglCreateContext telemetry for HWUI contexts
We want eglCreateContext telemetry to give us insights into how developers use EGL. Including HWUI telemetry in this pollutes this telemetry. Skip recording of the creation of this context using the new Egl extension. Currently this only disables the passing of GpuStatsInfo::Stats::CREATED_GLES_CONTEXT to the gpu stats. Test: Checked the code path executed correctly with the flag enabled/disabled using logging Bug: 347911216 Flag: com.android.graphics.hwui.flags.skip_eglmanager_telemetry Change-Id: Ifcadd5af263f26388026bcd70ec8dc9c2914cd0a
Diffstat (limited to 'libs/hwui/renderthread')
-rw-r--r--libs/hwui/renderthread/EglManager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index 708b0113e13e..60104452f4c0 100644
--- a/libs/hwui/renderthread/EglManager.cpp
+++ b/libs/hwui/renderthread/EglManager.cpp
@@ -19,6 +19,7 @@
#include <EGL/eglext.h>
#include <GLES/gl.h>
#include <cutils/properties.h>
+#include <graphicsenv/GpuStatsInfo.h>
#include <log/log.h>
#include <sync/sync.h>
#include <utils/Trace.h>
@@ -366,6 +367,10 @@ void EglManager::createContext() {
contextAttributes.push_back(EGL_CONTEXT_PRIORITY_LEVEL_IMG);
contextAttributes.push_back(Properties::contextPriority);
}
+ if (Properties::skipTelemetry) {
+ contextAttributes.push_back(EGL_TELEMETRY_HINT_ANDROID);
+ contextAttributes.push_back(android::GpuStatsInfo::SKIP_TELEMETRY);
+ }
contextAttributes.push_back(EGL_NONE);
mEglContext = eglCreateContext(
mEglDisplay, EglExtensions.noConfigContext ? ((EGLConfig) nullptr) : mEglConfig,