diff options
author | 2024-02-16 03:35:33 +0000 | |
---|---|---|
committer | 2024-02-16 03:35:33 +0000 | |
commit | 1d6363aafcc8cc31bc0684b4a81fc9c0d44fe84d (patch) | |
tree | 0e2bd5103ea6495bf7c66b90d8034ed2210b2597 /libs/gui/LayerState.cpp | |
parent | 4238fc9134fce2cb12091f3a1e2aea3d7a2a363c (diff) | |
parent | 1b0d4e16530a4feb99eafbfdfce2aeb39c5e23e3 (diff) |
Merge "Add support for restricting HDR headroom for video" into main
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r-- | libs/gui/LayerState.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp index 7564c26316..1e0aacddab 100644 --- a/libs/gui/LayerState.cpp +++ b/libs/gui/LayerState.cpp @@ -611,6 +611,10 @@ void layer_state_t::merge(const layer_state_t& other) { desiredHdrSdrRatio = other.desiredHdrSdrRatio; currentHdrSdrRatio = other.currentHdrSdrRatio; } + if (other.what & eDesiredHdrHeadroomChanged) { + what |= eDesiredHdrHeadroomChanged; + desiredHdrSdrRatio = other.desiredHdrSdrRatio; + } if (other.what & eCachingHintChanged) { what |= eCachingHintChanged; cachingHint = other.cachingHint; @@ -774,6 +778,7 @@ uint64_t layer_state_t::diff(const layer_state_t& other) const { CHECK_DIFF(diff, eDataspaceChanged, other, dataspace); CHECK_DIFF2(diff, eExtendedRangeBrightnessChanged, other, currentHdrSdrRatio, desiredHdrSdrRatio); + CHECK_DIFF(diff, eDesiredHdrHeadroomChanged, other, desiredHdrSdrRatio); CHECK_DIFF(diff, eCachingHintChanged, other, cachingHint); CHECK_DIFF(diff, eHdrMetadataChanged, other, hdrMetadata); if (other.what & eSurfaceDamageRegionChanged && |