[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/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 846460d..565a6ff 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -281,6 +281,8 @@
gui::DropInputMode dropInputMode;
bool autoRefresh = false;
+
+ bool dimmingEnabled = true;
};
/*
@@ -411,6 +413,7 @@
virtual mat4 getColorTransform() const;
virtual bool hasColorTransform() const;
virtual bool isColorSpaceAgnostic() const { return mDrawingState.colorSpaceAgnostic; }
+ virtual bool isDimmingEnabled() const { return getDrawingState().dimmingEnabled; };
// Used only to set BufferStateLayer state
virtual bool setTransform(uint32_t /*transform*/) { return false; };
@@ -437,6 +440,7 @@
}
virtual bool setBackgroundColor(const half3& color, float alpha, ui::Dataspace dataspace);
virtual bool setColorSpaceAgnostic(const bool agnostic);
+ virtual bool setDimmingEnabled(const bool dimmingEnabled);
virtual bool setFrameRateSelectionPriority(int32_t priority);
virtual bool setFixedTransformHint(ui::Transform::RotationFlags fixedTransformHint);
virtual void setAutoRefresh(bool /* autoRefresh */) {}