Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbb44464 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

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
parent 0607fbe8
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -2898,7 +2898,8 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& displayDev
            getRenderEngine().setupColorTransform(mDrawingState.colorMatrix);
            getRenderEngine().setupColorTransform(mDrawingState.colorMatrix);
        }
        }


        needsLegacyColorMatrix = (mDisplayColorSetting == DisplayColorSetting::ENHANCED &&
        needsLegacyColorMatrix =
            (displayDevice->getActiveRenderIntent() == RenderIntent::ENHANCE &&
             outputDataspace != Dataspace::UNKNOWN &&
             outputDataspace != Dataspace::UNKNOWN &&
             outputDataspace != Dataspace::SRGB);
             outputDataspace != Dataspace::SRGB);