[SurfaceFlinger] Disable HDR dimming when screen rotates.
- Disable dimming for screenshot layer
Bug: 224860402
Test: check HDR vidoes when rotation, atest libcompositionengine_test
Change-Id: Ib07a5af1d4e3e91737b3d5f3e5869c166759563f
Merged-In: Ib07a5af1d4e3e91737b3d5f3e5869c166759563f
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 34db5b1..304fc17 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -134,6 +134,7 @@
SAFE_PARCEL(output.writeByte, changeFrameRateStrategy);
SAFE_PARCEL(output.writeUint32, fixedTransformHint);
SAFE_PARCEL(output.writeBool, autoRefresh);
+ SAFE_PARCEL(output.writeBool, dimmingEnabled);
SAFE_PARCEL(output.writeUint32, blurRegions.size());
for (auto region : blurRegions) {
@@ -243,6 +244,7 @@
SAFE_PARCEL(input.readUint32, &tmpUint32);
fixedTransformHint = static_cast<ui::Transform::RotationFlags>(tmpUint32);
SAFE_PARCEL(input.readBool, &autoRefresh);
+ SAFE_PARCEL(input.readBool, &dimmingEnabled);
uint32_t numRegions = 0;
SAFE_PARCEL(input.readUint32, &numRegions);
@@ -598,6 +600,10 @@
what |= eColorSpaceAgnosticChanged;
colorSpaceAgnostic = other.colorSpaceAgnostic;
}
+ if (other.what & eDimmingEnabledChanged) {
+ what |= eDimmingEnabledChanged;
+ dimmingEnabled = other.dimmingEnabled;
+ }
if ((other.what & what) != other.what) {
ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? "
"other.what=0x%" PRIX64 " what=0x%" PRIX64 " unmerged flags=0x%" PRIX64,