Support skipping CachedSet rendering based on invalidate() proximity
Add tunable sysprops which allow for skipping rendering a new
CachedSet if we're too close to an invalidate(), so that rendering the
CachedSet does not cause jank.
The sysprops control:
1. Whether we support this type of deferred rendering
2. How close to a rendering deadline we're allowed to be
3. Max number of times we can skip before we give up and render anyway.
Bug: 188678587
Test: builds, boots
Test: perfetto
Change-Id: I9801c25da1d9178faa8fa28b9bd8f9d180db7b11
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index a4b6fef..a109f3b 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2040,6 +2040,7 @@
}
refreshArgs.earliestPresentTime = mScheduler->getPreviousVsyncFrom(mExpectedPresentTime);
+ refreshArgs.nextInvalidateTime = mEventQueue->nextExpectedInvalidate();
mGeometryInvalid = false;