OSDN Git Service

Early wake-up for transitions (2/2)
authorJorim Jaggi <jjaggi@google.com>
Thu, 22 Mar 2018 22:20:36 +0000 (23:20 +0100)
committerJorim Jaggi <jjaggi@google.com>
Fri, 6 Apr 2018 11:36:14 +0000 (13:36 +0200)
commitaa763cd35f9a74a93a2fc8cee74e8455e504788e
treef05ed76abb96ea7a6e2e70cc08e9852476bf5c8f
parentddeaefb546c15f26bf7d4372a0d3e000463c7a5e
Early wake-up for transitions (2/2)

On some devices it's very likely that we fall into GL comp during
app transitions. However, SF offsets are chosen in a way such that
the time to finish a frame is just too tight to be completely jank
free when hitting GL composition in SurfaceFlinger. Thus, we
introduce the concept of a separate early offset, and wakeup
SurfaceFlinger at that time if we think that hitting GL comp is
likely, or we already hit GL comp in the last frame.

Test: Open app, check vsync offsets in systrace
Test: Open many dialogs/apps to fall into GPU comp.
Bug: 75985430
Change-Id: I461fdcd573583f3ea0348c8b23cc9945d33f8976
core/java/android/view/SurfaceControl.java
core/jni/android_view_SurfaceControl.cpp
packages/SystemUI/shared/src/com/android/systemui/shared/system/TransactionCompat.java
packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
services/core/java/com/android/server/wm/AppWindowToken.java
services/core/java/com/android/server/wm/LocalAnimationAdapter.java
services/core/java/com/android/server/wm/SurfaceAnimationRunner.java
services/core/java/com/android/server/wm/WindowAnimationSpec.java
services/tests/servicestests/src/com/android/server/wm/WindowAnimationSpecTest.java