File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -7876,12 +7876,22 @@ ftl::SharedFuture<FenceResult> SurfaceFlinger::captureScreenshot(
78767876 return fenceResult;
78777877 }
78787878
7879- return getRenderEngine ()
7880- .tonemapAndDrawGainmap (hdrBuffer, fenceResult.value ()->get (),
7881- hdrSdrRatio,
7882- static_cast <ui::Dataspace>(dataspace),
7883- buffer, gainmapBuffer)
7884- .get ();
7879+ auto tonemapAndDrawGainmap = [&]() -> FenceResult {
7880+ return getRenderEngine ()
7881+ .tonemapAndDrawGainmap (hdrBuffer,
7882+ fenceResult.value ()->get (),
7883+ hdrSdrRatio,
7884+ static_cast <ui::Dataspace>(
7885+ dataspace),
7886+ buffer, gainmapBuffer)
7887+ .get ();
7888+ };
7889+
7890+ if (mRenderEngine ->isThreaded ()) {
7891+ return tonemapAndDrawGainmap ();
7892+ } else {
7893+ return mScheduler ->schedule (std::move (tonemapAndDrawGainmap)).get ();
7894+ }
78857895 })
78867896 .share ();
78877897 } else {
You can’t perform that action at this time.
0 commit comments