summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYichi Chen <yichichen@google.com>2020-07-06 21:24:14 +0800
committerYichi Chen <yichichen@google.com>2020-07-06 21:35:48 +0800
commit28dee2c582c74dd849483e2ae841251716f71609 (patch)
tree39e206411a0445b6b81059395ada4a70ffd13523
parent22615145ca07a161a14f16c99cb8ffb2600e0826 (diff)
downloadnative-28dee2c582c74dd849483e2ae841251716f71609.tar.gz
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
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 07690cbf32..0ac3d329e9 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2121,7 +2121,8 @@ void SurfaceFlinger::onMessageRefresh() {
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) {