SF: refactor renderScreenImpl to use CompositionEngine
Bug: 238643986
Test: presubmits
Test: go/wm-smoke
Change-Id: I6dbbcd5ce5070ec1d801dca55b5bb89fafe839cb
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 83a46ae..2a18521 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -3499,6 +3499,12 @@
return mSnapshot.get();
}
+sp<LayerFE> Layer::copyCompositionEngineLayerFE() const {
+ auto result = mFlinger->getFactory().createLayerFE(mLayerFE->getDebugName());
+ result->mSnapshot = std::make_unique<LayerSnapshot>(*mSnapshot);
+ return result;
+}
+
void Layer::useSurfaceDamage() {
if (mFlinger->mForceFullDamage) {
surfaceDamageRegion = Region::INVALID_REGION;