Propagate the 170M->sRGB lie everywhere.
If the device is configured to decode SDR video standards as sRGB, then
we need to do this for screenshots and caching as well.
See patch I64fc8f2ea77f8e595333de36fb9da2979d8316ca for why we allow for reinterpreting 170M as sRGB.
Bug: 288330598
Test: Netflix full screen, disable HW overlays, then swipe to home
Change-Id: Ie4eabd6301826fcb9e302ba6079f7f6b94e5a8b8
diff --git a/services/surfaceflinger/ScreenCaptureOutput.cpp b/services/surfaceflinger/ScreenCaptureOutput.cpp
index 09dac23..ee87687 100644
--- a/services/surfaceflinger/ScreenCaptureOutput.cpp
+++ b/services/surfaceflinger/ScreenCaptureOutput.cpp
@@ -37,6 +37,7 @@
output->setRenderSurface(std::make_unique<ScreenCaptureRenderSurface>(std::move(args.buffer)));
output->setDisplayBrightness(args.sdrWhitePointNits, args.displayBrightnessNits);
output->editState().clientTargetBrightness = args.targetBrightness;
+ output->editState().treat170mAsSrgb = args.treat170mAsSrgb;
output->setDisplayColorProfile(std::make_unique<compositionengine::impl::DisplayColorProfile>(
compositionengine::DisplayColorProfileCreationArgsBuilder()