From bdf7e4b411b312687559e5610d35cd0ca2e1d86e Mon Sep 17 00:00:00 2001 From: Marc Kassis Date: Fri, 4 Nov 2022 17:26:48 +0100 Subject: Each Display Mode now has a list of supported HDR types. SurfaceFlinger removes Dolby Vision as a supported HDR type when a certain mode does not support it Bug: 241349060 Test: atest ExcludeDolbyVisionTest Change-Id: I481cc13417f65cbcb1f4658be410adb6e99c760b --- libs/gui/SurfaceComposerClient.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/gui/SurfaceComposerClient.cpp') diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 1e43700d06..aaa2102a0d 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -2330,6 +2330,9 @@ status_t SurfaceComposerClient::getDynamicDisplayInfo(const sp& display outMode.sfVsyncOffset = mode.sfVsyncOffset; outMode.presentationDeadline = mode.presentationDeadline; outMode.group = mode.group; + std::transform(mode.supportedHdrTypes.begin(), mode.supportedHdrTypes.end(), + std::back_inserter(outMode.supportedHdrTypes), + [](const int32_t& value) { return static_cast(value); }); outInfo->supportedDisplayModes.push_back(outMode); } -- cgit v1.2.3-59-g8ed1b