Add promise for buffer releaseFence to LayerFE.
Buffers can only be released when a release fence fires.
Instead of tracking and waiting for each layer's Futures to
complete, LayerFE can keep track of its own Future via a
promise of a fence. This cleans up the shared futures that
are currently being tracked and allow us to setup for
eventual goals to reduce the number of screenshot calls to
the main thread.
Tests using a virtual display are modified to use the
mirrorDisplay API with a unique layerstack.
Bug: b/294936197, b/285553970
Test: manual (screenshot, camera, rotation, picture-in-picture)
Test: presubmit
Test: atest CompositionEnginePostCompositionTest
Test: atest SurfaceFlinger_test
Change-Id: I3a0af2cd02d3d010a1ea7c860c5cb0bc20837ec2
diff --git a/services/surfaceflinger/common/FlagManager.cpp b/services/surfaceflinger/common/FlagManager.cpp
index 8276eed..4b34a55 100644
--- a/services/surfaceflinger/common/FlagManager.cpp
+++ b/services/surfaceflinger/common/FlagManager.cpp
@@ -136,6 +136,7 @@
DUMP_READ_ONLY_FLAG(restore_blur_step);
DUMP_READ_ONLY_FLAG(dont_skip_on_early_ro);
DUMP_READ_ONLY_FLAG(protected_if_client);
+ DUMP_READ_ONLY_FLAG(ce_fence_promise);
#undef DUMP_READ_ONLY_FLAG
#undef DUMP_SERVER_FLAG
#undef DUMP_FLAG_INTERVAL
@@ -220,6 +221,7 @@
FLAG_MANAGER_READ_ONLY_FLAG(restore_blur_step, "debug.renderengine.restore_blur_step")
FLAG_MANAGER_READ_ONLY_FLAG(dont_skip_on_early_ro, "")
FLAG_MANAGER_READ_ONLY_FLAG(protected_if_client, "")
+FLAG_MANAGER_READ_ONLY_FLAG(ce_fence_promise, "");
/// Trunk stable server flags ///
FLAG_MANAGER_SERVER_FLAG(refresh_rate_overlay_on_external_display, "")