diff options
author | 2024-09-13 15:03:02 +0000 | |
---|---|---|
committer | 2024-09-13 15:03:02 +0000 | |
commit | de3019c89c0cd6d24f9f2037ad60fa57a2a9345e (patch) | |
tree | bb998b17ed1927d2a44a3559e39ed3ff2e7ab7e5 /services/surfaceflinger/ScreenCaptureOutput.cpp | |
parent | 25f78d0ea920370a94689247bef1641d85bf9d48 (diff) | |
parent | 1b1853f92528a2214f0337decf4685250334a43c (diff) |
Merge "Support capturing a gainmapped screenshot" into main
Diffstat (limited to 'services/surfaceflinger/ScreenCaptureOutput.cpp')
-rw-r--r-- | services/surfaceflinger/ScreenCaptureOutput.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/surfaceflinger/ScreenCaptureOutput.cpp b/services/surfaceflinger/ScreenCaptureOutput.cpp index 8bb72b8470..41a9a1bb22 100644 --- a/services/surfaceflinger/ScreenCaptureOutput.cpp +++ b/services/surfaceflinger/ScreenCaptureOutput.cpp @@ -93,6 +93,12 @@ renderengine::DisplaySettings ScreenCaptureOutput::generateClientCompositionDisp if (mEnableLocalTonemapping) { clientCompositionDisplay.tonemapStrategy = renderengine::DisplaySettings::TonemapStrategy::Local; + if (static_cast<ui::PixelFormat>(buffer->getPixelFormat()) == ui::PixelFormat::RGBA_FP16) { + clientCompositionDisplay.targetHdrSdrRatio = + getState().displayBrightnessNits / getState().sdrWhitePointNits; + } else { + clientCompositionDisplay.targetHdrSdrRatio = 1.f; + } } return clientCompositionDisplay; |