Loading libs/hwui/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,7 @@ cc_defaults { "aconfig_text_flags_c_lib", "server_configurable_flags", "libaconfig_storage_read_api_cc", "libgraphicsenv", ], static_libs: [ "libEGL_blobCache", Loading libs/hwui/Properties.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,11 @@ constexpr bool hdr_10bit_plus() { constexpr bool initialize_gl_always() { return false; } constexpr bool skip_eglmanager_telemetry() { return false; } constexpr bool resample_gainmap_regions() { return false; } Loading Loading @@ -103,6 +108,7 @@ float Properties::maxHdrHeadroomOn8bit = 5.f; // TODO: Refine this number bool Properties::clipSurfaceViews = false; bool Properties::hdr10bitPlus = false; bool Properties::skipTelemetry = false; bool Properties::resampleGainmapRegions = false; int Properties::timeoutMultiplier = 1; Loading Loading @@ -183,6 +189,8 @@ bool Properties::load() { 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); } Loading libs/hwui/Properties.h +3 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,8 @@ enum DebugLevel { */ #define PROPERTY_INITIALIZE_GL_ALWAYS "debug.hwui.initialize_gl_always" #define PROPERTY_SKIP_EGLMANAGER_TELEMETRY "debug.hwui.skip_eglmanager_telemetry" /////////////////////////////////////////////////////////////////////////////// // Misc /////////////////////////////////////////////////////////////////////////////// Loading Loading @@ -342,6 +344,7 @@ public: static bool clipSurfaceViews; static bool hdr10bitPlus; static bool skipTelemetry; static bool resampleGainmapRegions; static int timeoutMultiplier; Loading libs/hwui/aconfig/hwui_flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,13 @@ flag { bug: "335172671" } flag { name: "skip_eglmanager_telemetry" namespace: "core_graphics" description: "Skip telemetry in EglManager's calls to eglCreateContext to avoid polluting telemetry" bug: "347911216" } flag { name: "resample_gainmap_regions" namespace: "core_graphics" Loading libs/hwui/renderthread/EglManager.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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, Loading Loading
libs/hwui/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -143,6 +143,7 @@ cc_defaults { "aconfig_text_flags_c_lib", "server_configurable_flags", "libaconfig_storage_read_api_cc", "libgraphicsenv", ], static_libs: [ "libEGL_blobCache", Loading
libs/hwui/Properties.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,11 @@ constexpr bool hdr_10bit_plus() { constexpr bool initialize_gl_always() { return false; } constexpr bool skip_eglmanager_telemetry() { return false; } constexpr bool resample_gainmap_regions() { return false; } Loading Loading @@ -103,6 +108,7 @@ float Properties::maxHdrHeadroomOn8bit = 5.f; // TODO: Refine this number bool Properties::clipSurfaceViews = false; bool Properties::hdr10bitPlus = false; bool Properties::skipTelemetry = false; bool Properties::resampleGainmapRegions = false; int Properties::timeoutMultiplier = 1; Loading Loading @@ -183,6 +189,8 @@ bool Properties::load() { 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); } Loading
libs/hwui/Properties.h +3 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,8 @@ enum DebugLevel { */ #define PROPERTY_INITIALIZE_GL_ALWAYS "debug.hwui.initialize_gl_always" #define PROPERTY_SKIP_EGLMANAGER_TELEMETRY "debug.hwui.skip_eglmanager_telemetry" /////////////////////////////////////////////////////////////////////////////// // Misc /////////////////////////////////////////////////////////////////////////////// Loading Loading @@ -342,6 +344,7 @@ public: static bool clipSurfaceViews; static bool hdr10bitPlus; static bool skipTelemetry; static bool resampleGainmapRegions; static int timeoutMultiplier; Loading
libs/hwui/aconfig/hwui_flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,13 @@ flag { bug: "335172671" } flag { name: "skip_eglmanager_telemetry" namespace: "core_graphics" description: "Skip telemetry in EglManager's calls to eglCreateContext to avoid polluting telemetry" bug: "347911216" } flag { name: "resample_gainmap_regions" namespace: "core_graphics" Loading
libs/hwui/renderthread/EglManager.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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, Loading