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
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 1e43700..aaa2102 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -2330,6 +2330,9 @@
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<ui::Hdr>(value); });
outInfo->supportedDisplayModes.push_back(outMode);
}