Loading libs/hwui/Properties.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ bool Properties::isHighEndGfx = true; bool Properties::isLowRam = false; bool Properties::isSystemOrPersistent = false; float Properties::maxHdrHeadroomOn8bit = 5.f; // TODO: Refine this number StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI; DrawingEnabled Properties::drawingEnabled = DrawingEnabled::NotInitialized; Loading Loading @@ -150,6 +152,11 @@ bool Properties::load() { enableWebViewOverlays = base::GetBoolProperty(PROPERTY_WEBVIEW_OVERLAYS_ENABLED, true); auto hdrHeadroom = (float)atof(base::GetProperty(PROPERTY_8BIT_HDR_HEADROOM, "").c_str()); if (hdrHeadroom >= 1.f) { maxHdrHeadroomOn8bit = std::min(hdrHeadroom, 100.f); } // call isDrawingEnabled to force loading of the property isDrawingEnabled(); Loading libs/hwui/Properties.h +4 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,8 @@ enum DebugLevel { #define PROPERTY_MEMORY_POLICY "debug.hwui.app_memory_policy" #define PROPERTY_8BIT_HDR_HEADROOM "debug.hwui.8bit_hdr_headroom" /////////////////////////////////////////////////////////////////////////////// // Misc /////////////////////////////////////////////////////////////////////////////// Loading Loading @@ -321,6 +323,8 @@ public: static bool isLowRam; static bool isSystemOrPersistent; static float maxHdrHeadroomOn8bit; static StretchEffectBehavior getStretchEffectBehavior() { return stretchEffectBehavior; } Loading libs/hwui/renderthread/CanvasContext.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ float CanvasContext::setColorMode(ColorMode mode) { } switch (mColorMode) { case ColorMode::Hdr: return 3.f; // TODO: Refine this number return Properties::maxHdrHeadroomOn8bit; case ColorMode::Hdr10: return 10.f; default: Loading Loading
libs/hwui/Properties.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,8 @@ bool Properties::isHighEndGfx = true; bool Properties::isLowRam = false; bool Properties::isSystemOrPersistent = false; float Properties::maxHdrHeadroomOn8bit = 5.f; // TODO: Refine this number StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI; DrawingEnabled Properties::drawingEnabled = DrawingEnabled::NotInitialized; Loading Loading @@ -150,6 +152,11 @@ bool Properties::load() { enableWebViewOverlays = base::GetBoolProperty(PROPERTY_WEBVIEW_OVERLAYS_ENABLED, true); auto hdrHeadroom = (float)atof(base::GetProperty(PROPERTY_8BIT_HDR_HEADROOM, "").c_str()); if (hdrHeadroom >= 1.f) { maxHdrHeadroomOn8bit = std::min(hdrHeadroom, 100.f); } // call isDrawingEnabled to force loading of the property isDrawingEnabled(); Loading
libs/hwui/Properties.h +4 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,8 @@ enum DebugLevel { #define PROPERTY_MEMORY_POLICY "debug.hwui.app_memory_policy" #define PROPERTY_8BIT_HDR_HEADROOM "debug.hwui.8bit_hdr_headroom" /////////////////////////////////////////////////////////////////////////////// // Misc /////////////////////////////////////////////////////////////////////////////// Loading Loading @@ -321,6 +323,8 @@ public: static bool isLowRam; static bool isSystemOrPersistent; static float maxHdrHeadroomOn8bit; static StretchEffectBehavior getStretchEffectBehavior() { return stretchEffectBehavior; } Loading
libs/hwui/renderthread/CanvasContext.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ float CanvasContext::setColorMode(ColorMode mode) { } switch (mColorMode) { case ColorMode::Hdr: return 3.f; // TODO: Refine this number return Properties::maxHdrHeadroomOn8bit; case ColorMode::Hdr10: return 10.f; default: Loading