summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2024-02-16 03:35:33 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-02-16 03:35:33 +0000
commit1d6363aafcc8cc31bc0684b4a81fc9c0d44fe84d (patch)
tree0e2bd5103ea6495bf7c66b90d8034ed2210b2597 /libs/gui/LayerState.cpp
parent4238fc9134fce2cb12091f3a1e2aea3d7a2a363c (diff)
parent1b0d4e16530a4feb99eafbfdfce2aeb39c5e23e3 (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.cpp5
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 &&