diff options
| author | 2024-06-20 20:42:50 +0000 | |
|---|---|---|
| committer | 2024-06-20 20:42:50 +0000 | |
| commit | 3dd03323aa8825a0c7bf4dcc1ed6d6c3b88a3d7f (patch) | |
| tree | e05639565a22611c334a83a35a998f3fba3e1f1a /services/surfaceflinger/ScreenCaptureOutput.cpp | |
| parent | 447d0a33acc9827809d1049023b05e4cac05fc70 (diff) | |
| parent | bb1814a0b94e8efb3fa3843c3d6a6533a382cac3 (diff) | |
Merge "Merge 24Q3 (ab/11976889) to aosp-main-future" into aosp-main-future
Diffstat (limited to 'services/surfaceflinger/ScreenCaptureOutput.cpp')
| -rw-r--r-- | services/surfaceflinger/ScreenCaptureOutput.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/services/surfaceflinger/ScreenCaptureOutput.cpp b/services/surfaceflinger/ScreenCaptureOutput.cpp index dd03366bcc..8bb72b8470 100644 --- a/services/surfaceflinger/ScreenCaptureOutput.cpp +++ b/services/surfaceflinger/ScreenCaptureOutput.cpp @@ -30,7 +30,7 @@ std::shared_ptr<ScreenCaptureOutput> createScreenCaptureOutput(ScreenCaptureOutp ScreenCaptureOutput, compositionengine::CompositionEngine, const RenderArea&, const compositionengine::Output::ColorProfile&, bool>(args.compositionEngine, args.renderArea, args.colorProfile, args.regionSampling, - args.dimInGammaSpaceForEnhancedScreenshots); + args.dimInGammaSpaceForEnhancedScreenshots, args.enableLocalTonemapping); output->editState().isSecure = args.renderArea.isSecure(); output->editState().isProtected = args.isProtected; output->setCompositionEnabled(true); @@ -63,11 +63,13 @@ std::shared_ptr<ScreenCaptureOutput> createScreenCaptureOutput(ScreenCaptureOutp ScreenCaptureOutput::ScreenCaptureOutput( const RenderArea& renderArea, const compositionengine::Output::ColorProfile& colorProfile, - bool regionSampling, bool dimInGammaSpaceForEnhancedScreenshots) + bool regionSampling, bool dimInGammaSpaceForEnhancedScreenshots, + bool enableLocalTonemapping) : mRenderArea(renderArea), mColorProfile(colorProfile), mRegionSampling(regionSampling), - mDimInGammaSpaceForEnhancedScreenshots(dimInGammaSpaceForEnhancedScreenshots) {} + mDimInGammaSpaceForEnhancedScreenshots(dimInGammaSpaceForEnhancedScreenshots), + mEnableLocalTonemapping(enableLocalTonemapping) {} void ScreenCaptureOutput::updateColorProfile(const compositionengine::CompositionRefreshArgs&) { auto& outputState = editState(); @@ -88,6 +90,11 @@ renderengine::DisplaySettings ScreenCaptureOutput::generateClientCompositionDisp aidl::android::hardware::graphics::composer3::DimmingStage::GAMMA_OETF; } + if (mEnableLocalTonemapping) { + clientCompositionDisplay.tonemapStrategy = + renderengine::DisplaySettings::TonemapStrategy::Local; + } + return clientCompositionDisplay; } |