diff options
author | Chia-I Wu <olv@google.com> | 2018-05-21 15:33:27 -0700 |
---|---|---|
committer | Chia-I Wu <olv@google.com> | 2018-05-23 15:02:34 -0700 |
commit | bbb44464990d0becd1c5eef77f85da82b8008534 (patch) | |
tree | 7a5e34d92ada8a151174d6e7d1213edde9116a64 | |
parent | 0607fbe8956a64151b165ac88ef9f3cf9b4ece5d (diff) | |
download | native-bbb44464990d0becd1c5eef77f85da82b8008534.tar.gz |
surfaceflinger: display color setting is a hint
Display color setting is merely a hint. Check the active render
intent before applying the legacy sRGB color matrix.
Bug: 79843697
Test: manual
Change-Id: I73b45cbf2274a56037ce0439470f1baafffa8914
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index e7e3eb3b6c..fe9a1d0ac1 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2898,9 +2898,10 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& displayDev getRenderEngine().setupColorTransform(mDrawingState.colorMatrix); } - needsLegacyColorMatrix = (mDisplayColorSetting == DisplayColorSetting::ENHANCED && - outputDataspace != Dataspace::UNKNOWN && - outputDataspace != Dataspace::SRGB); + needsLegacyColorMatrix = + (displayDevice->getActiveRenderIntent() == RenderIntent::ENHANCE && + outputDataspace != Dataspace::UNKNOWN && + outputDataspace != Dataspace::SRGB); if (!displayDevice->makeCurrent()) { ALOGW("DisplayDevice::makeCurrent failed. Aborting surface composition for display %s", |