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

Commit f6eb766f authored by Peiyong Lin's avatar Peiyong Lin
Browse files

[SurfaceFlinger] Pick the widest color space.

Pick Display P3 for HDR video instead of sRGB.

BUG: 80404330
Test: Build, flash and boot.
Change-Id: Ief9656ef439cd14a6efbb6d31da5d5a6ad9be4b7
parent 4b70146a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2356,10 +2356,12 @@ Dataspace SurfaceFlinger::getBestDataspace(const sp<const DisplayDevice>& displa
                break;
            case Dataspace::BT2020_PQ:
            case Dataspace::BT2020_ITU_PQ:
                bestDataSpace = Dataspace::DISPLAY_P3;
                *outHdrDataSpace = Dataspace::BT2020_PQ;
                break;
            case Dataspace::BT2020_HLG:
            case Dataspace::BT2020_ITU_HLG:
                bestDataSpace = Dataspace::DISPLAY_P3;
                // When there's mixed PQ content and HLG content, we set the HDR
                // data space to be BT2020_PQ and convert HLG to PQ.
                if (*outHdrDataSpace == Dataspace::UNKNOWN) {