From 7dae9c10f1588f48da9ce8015b75ebdc54be8a8d Mon Sep 17 00:00:00 2001 From: Alec Mouri Date: Thu, 13 Jul 2023 19:40:53 +0000 Subject: 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 --- services/surfaceflinger/ScreenCaptureOutput.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'services/surfaceflinger/ScreenCaptureOutput.cpp') diff --git a/services/surfaceflinger/ScreenCaptureOutput.cpp b/services/surfaceflinger/ScreenCaptureOutput.cpp index 09dac23410..ee87687eea 100644 --- a/services/surfaceflinger/ScreenCaptureOutput.cpp +++ b/services/surfaceflinger/ScreenCaptureOutput.cpp @@ -37,6 +37,7 @@ std::shared_ptr createScreenCaptureOutput(ScreenCaptureOutp output->setRenderSurface(std::make_unique(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::DisplayColorProfileCreationArgsBuilder() -- cgit v1.2.3-59-g8ed1b