Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f110207d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Dispatch tonemapAndDrawGainmap on main thread with non-threaded RE" into main

parents 968f1fbd fac5ec2e
Loading
Loading
Loading
Loading
+16 −6
Original line number Diff line number Diff line
@@ -7887,12 +7887,22 @@ ftl::SharedFuture<FenceResult> SurfaceFlinger::captureScreenshot(
                                return fenceResult;
                            }

                            auto tonemapAndDrawGainmap = [&]() -> FenceResult {
                                return getRenderEngine()
                                    .tonemapAndDrawGainmap(hdrBuffer, fenceResult.value()->get(),
                                        .tonemapAndDrawGainmap(hdrBuffer,
                                                               fenceResult.value()->get(),
                                                               hdrSdrRatio,
                                                           static_cast<ui::Dataspace>(dataspace),
                                                               static_cast<ui::Dataspace>(
                                                                       dataspace),
                                                               buffer, gainmapBuffer)
                                        .get();
                            };

                            if (mRenderEngine->isThreaded()) {
                                return tonemapAndDrawGainmap();
                            } else {
                                return mScheduler->schedule(std::move(tonemapAndDrawGainmap)).get();
                            }
                        })
                        .share();
    } else {