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

Commit 6753a021 authored by tangrobin's avatar tangrobin Committed by Robin Tang
Browse files

surfaceflinger: fix misplacement of getHwComposer related function

getHdrCapabilities and getSupportedPerFrameMetadata should not depend on hasWideColorDisplay.

Bug: 112082244
Test: screenrecord
Change-Id: I1c25d82eb41b5378b71f3837fe888012d43d9b1d
parent 532bef18
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -2328,7 +2328,9 @@ sp<DisplayDevice> SurfaceFlinger::setupNewDisplayDeviceInternal(
                    getHwComposer().getRenderIntents(displayId, colorMode);
                    getHwComposer().getRenderIntents(displayId, colorMode);
            hwcColorModes.emplace(colorMode, renderIntents);
            hwcColorModes.emplace(colorMode, renderIntents);
        }
        }
    }


    if (displayId >= 0) {
        getHwComposer().getHdrCapabilities(displayId, &hdrCapabilities);
        getHwComposer().getHdrCapabilities(displayId, &hdrCapabilities);
        supportedPerFrameMetadata = getHwComposer().getSupportedPerFrameMetadata(displayId);
        supportedPerFrameMetadata = getHwComposer().getSupportedPerFrameMetadata(displayId);
    }
    }
+2 −1
Original line number Original line Diff line number Diff line
@@ -657,7 +657,8 @@ using NonHwcVirtualDisplayCase =
using SimpleHwcVirtualDisplayVariant = HwcVirtualDisplayVariant<1024, 768, Secure::TRUE>;
using SimpleHwcVirtualDisplayVariant = HwcVirtualDisplayVariant<1024, 768, Secure::TRUE>;
using HwcVirtualDisplayCase =
using HwcVirtualDisplayCase =
        Case<SimpleHwcVirtualDisplayVariant, WideColorSupportNotConfiguredVariant,
        Case<SimpleHwcVirtualDisplayVariant, WideColorSupportNotConfiguredVariant,
             NonHwcDisplayHdrSupportVariant, NonHwcPerFrameMetadataSupportVariant>;
             HdrNotSupportedVariant<SimpleHwcVirtualDisplayVariant>, 
             NoPerFrameMetadataSupportVariant<SimpleHwcVirtualDisplayVariant>>;
using WideColorP3ColorimetricDisplayCase =
using WideColorP3ColorimetricDisplayCase =
        Case<PrimaryDisplayVariant, WideColorP3ColorimetricSupportedVariant<PrimaryDisplayVariant>,
        Case<PrimaryDisplayVariant, WideColorP3ColorimetricSupportedVariant<PrimaryDisplayVariant>,
             HdrNotSupportedVariant<PrimaryDisplayVariant>,
             HdrNotSupportedVariant<PrimaryDisplayVariant>,