SurfaceFlinger: Enable ealy offset for reused client composition
In the condition of reused client composition, SurfaceFlinger still
needed to call 'validate' and 'presentDisplay' and resulted in longer
execution time. Before we can enable skip validation in this case, we
need to provide the early offset to fit HWC behavior.
Bug: 160552879
Test: Check the Vsync offset in PIP
Change-Id: I6d11c6b1409997f550cf2441bba67de08ffb25a8
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 07690cb..0ac3d32 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2121,7 +2121,8 @@
mTimeStats->incrementCompositionStrategyChanges();
}
- mVSyncModulator->onRefreshed(mHadClientComposition);
+ // TODO: b/160583065 Enable skip validation when SF caches all client composition layers
+ mVSyncModulator->onRefreshed(mHadClientComposition || mReusedClientComposition);
mLayersWithQueuedFrames.clear();
if (mVisibleRegionsDirty) {