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
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp
index 1217b47..b6476c9 100644
--- a/libs/hwui/Properties.cpp
+++ b/libs/hwui/Properties.cpp
@@ -42,6 +42,11 @@
constexpr bool initialize_gl_always() {
return false;
}
+
+constexpr bool skip_eglmanager_telemetry() {
+ return false;
+}
+
constexpr bool resample_gainmap_regions() {
return false;
}
@@ -103,6 +108,7 @@
bool Properties::clipSurfaceViews = false;
bool Properties::hdr10bitPlus = false;
+bool Properties::skipTelemetry = false;
bool Properties::resampleGainmapRegions = false;
int Properties::timeoutMultiplier = 1;
@@ -183,6 +189,8 @@
hwui_flags::resample_gainmap_regions());
timeoutMultiplier = android::base::GetIntProperty("ro.hw_timeout_multiplier", 1);
+ skipTelemetry = base::GetBoolProperty(PROPERTY_SKIP_EGLMANAGER_TELEMETRY,
+ hwui_flags::skip_eglmanager_telemetry());
return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw);
}