diff options
author | 2023-03-14 21:58:26 -0400 | |
---|---|---|
committer | 2023-03-15 13:53:00 -0400 | |
commit | 342f621ade811982fb08fa01fd493629913ce549 (patch) | |
tree | e230e769f793ed58b00fa85e4ab8760a2f716e5c /libs/hwui/Properties.cpp | |
parent | 388ddde5fa84a3edd0c3f5c4f77fa1699a4db17b (diff) |
Add sysprop to control HDR headroom
To accelerate tuning of the value allow it to be sysprop driven
Bug: 273624684
Test: change prop, verify silkfx headroom changes after re-launch
Change-Id: Ibad662b7ba06bd821c7a3ce48c19f4c94c716b5e
Diffstat (limited to 'libs/hwui/Properties.cpp')
-rw-r--r-- | libs/hwui/Properties.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/hwui/Properties.cpp b/libs/hwui/Properties.cpp index b0896daee2a1..9df6822b4867 100644 --- a/libs/hwui/Properties.cpp +++ b/libs/hwui/Properties.cpp @@ -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; @@ -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(); |