summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Sally Qi <sallyqi@google.com> 2022-03-21 19:41:33 -0700
committer Sally Qi <sallyqi@google.com> 2022-03-28 14:35:16 -0700
commit421ffb0be94bbacb4bed18524ea5f36695061e08 (patch)
treef444d67222ce5d4ef3c67394b8e86e24fea3a65f /libs/gui/LayerState.cpp
parent4f33a956985766fff428fa3d834157be477fedba (diff)
[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
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index 49b669eb3f..9d4d99fddc 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -134,6 +134,7 @@ status_t layer_state_t::write(Parcel& output) const
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 @@ status_t layer_state_t::read(const Parcel& input)
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 @@ void layer_state_t::merge(const layer_state_t& other) {
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,