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

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

surfaceflinger: simplify getActiveColorMode check

When mForceNativeColorMode is true, getActiveColorMode returns
HAL_COLOR_MODE_NATIVE.  There is no need to check both.

Test: manual with UiBench
Change-Id: I3bbf66d85ccb262441b9d216096ec869c529b7e8
parent 69bf10f5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2739,7 +2739,7 @@ bool SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& displayDev
        ALOGV("hasClientComposition");

        android_dataspace outputDataspace = HAL_DATASPACE_UNKNOWN;
        if (!mForceNativeColorMode && displayDevice->getWideColorSupport() &&
        if (displayDevice->getWideColorSupport() &&
                displayDevice->getActiveColorMode() == HAL_COLOR_MODE_DISPLAY_P3) {
            outputDataspace = HAL_DATASPACE_DISPLAY_P3;
        }
@@ -4600,7 +4600,7 @@ void SurfaceFlinger::renderScreenImplLocked(const RenderArea& renderArea,
    }

    android_dataspace outputDataspace = HAL_DATASPACE_UNKNOWN;
    if (!mForceNativeColorMode && renderArea.getWideColorSupport() &&
    if (renderArea.getWideColorSupport() &&
            renderArea.getActiveColorMode() == HAL_COLOR_MODE_DISPLAY_P3) {
        outputDataspace = HAL_DATASPACE_DISPLAY_P3;
    }