summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/CompositionEngine/src/Display.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/CompositionEngine/src/Display.cpp')
-rw-r--r--services/surfaceflinger/CompositionEngine/src/Display.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/services/surfaceflinger/CompositionEngine/src/Display.cpp b/services/surfaceflinger/CompositionEngine/src/Display.cpp
index 0a30928947..4850e2893e 100644
--- a/services/surfaceflinger/CompositionEngine/src/Display.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Display.cpp
@@ -146,7 +146,16 @@ void Display::setColorProfile(const ColorProfile& colorProfile) {
const auto physicalId = PhysicalDisplayId::tryCast(mId);
LOG_FATAL_IF(!physicalId);
- mIsColorModeChanged = true;
+ if (colorProfile.mode != mColorProfile.mode ||
+ colorProfile.dataspace != mColorProfile.dataspace ||
+ colorProfile.renderIntent != mColorProfile.renderIntent) {
+ mIsColorModeChanged = true;
+ }
+
+ mColorProfile.mode = colorProfile.mode;
+ mColorProfile.dataspace = colorProfile.dataspace;
+ mColorProfile.renderIntent = colorProfile.renderIntent;
+ mColorProfile.colorSpaceAgnosticDataspace = colorProfile.colorSpaceAgnosticDataspace;
getCompositionEngine().getHwComposer().setActiveColorMode(*physicalId, colorProfile.mode,
colorProfile.renderIntent);