Refactor RenderAreaFuture to use RenderAreaBuilder
Cleans up renderArea logic and allows all the work that needs
to be done on the main thread in the same place. This will aid
in the effort to reduce the number of hops to the SF main
thread during screenshots.
Bug: b/294936197
Test: atest SurfaceFlinger_test
Test: presubmit
Change-Id: I4234b49638aaecceb8d1fcff7f5cd43698b6c47f
diff --git a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
index 9353467..d3b6e17 100644
--- a/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
+++ b/services/surfaceflinger/tests/unittests/TestableSurfaceFlinger.h
@@ -475,7 +475,7 @@
return mFlinger->setPowerModeInternal(display, mode);
}
- auto renderScreenImpl(std::shared_ptr<const RenderArea> renderArea,
+ auto renderScreenImpl(std::unique_ptr<const RenderArea> renderArea,
SurfaceFlinger::GetLayerSnapshotsFunction traverseLayers,
const std::shared_ptr<renderengine::ExternalTexture>& buffer,
bool regionSampling) {