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

Commit 9d256ffb authored by Ramakant Singh's avatar Ramakant Singh Committed by Bruno Martins
Browse files

Exsf: Add hardware hdr capability check

Enable GPU composition for HDR layer if hw supports
not present.

CRs-Fixed: 2328105
Change-Id: I468eeb6a78684cf90a1420b42eaafc047b79bb21
parent dec8d0db
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -65,6 +65,11 @@ ExBufferLayer::ExBufferLayer(SurfaceFlinger* flinger, const sp<Client>& client,
    }

    mScreenshot = (std::string(name).find("ScreenshotSurface") != std::string::npos);
    const sp<const DisplayDevice> hw(mFlinger->getDefaultDisplayDevice());
    mHasHDRCapabilities = hw->hasHDR10Support() ||
                          hw->hasHLGSupport()   ||
                          hw->hasDolbyVisionSupport();

}

ExBufferLayer::~ExBufferLayer() {
@@ -93,7 +98,7 @@ bool ExBufferLayer::isHDRLayer() const {
            (colorData.transfer == Transfer_SMPTE_ST2084 ||
            colorData.transfer == Transfer_HLG)) {
                return (!ExSurfaceFlinger::AllowHDRFallBack() &&
                        !mFlinger->IsHWCDisabled());
                        !mFlinger->IsHWCDisabled() &&  mHasHDRCapabilities);
        }
    }

+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ protected:
    bool isDebug() { return mDebugLogs; }
    bool mIsGPUAllowedForProtected;
    bool mScreenshot;
    bool mHasHDRCapabilities;
};

}; // namespace android