OSDN Git Service

Immediately report drawing
authorJorim Jaggi <jjaggi@google.com>
Sat, 13 May 2017 00:00:31 +0000 (02:00 +0200)
committerJorim Jaggi <jjaggi@google.com>
Tue, 16 May 2017 12:32:22 +0000 (14:32 +0200)
commitdc9385aad49bf2ba24c1221a5d4558a1ac69f97a
tree3f257809bc613a2d532782b9afcdcc63b6f4fc98
parent5afccc62517a5c9ba44ed7671f130230297af83b
Immediately report drawing

No need to wait on the next relayout - this can only delay the
transition. Makes hot launches a lot more consistent.

However, this made it too fast! We then hit a race condition when
the app transition was already starting but no other layout was
done yet. When another layout was executed we noticed that we need
to report resized for the starting window, clearing it's drawn
state, which set startingDisplayed=false, which jumped the app
window animation to the end.

To fix this, make sure not to report another resized immediately
after the initial layout, as the client already knows the latest
(because it calls relayout at some point before it starts drawing).

Also fix "animating" async systrace for better analysis.

Test: Open/close size-mismatching task snapshot 100 times, ensure
no animation skipped.
Test: Look at app transition logs, ensure more consistent.
Test: Overall system sanity testing (open a couple of apps/dialogs
etc).

Bug: 32668632
Change-Id: Id795cd6a84f22e6a619089cb9554fc5033477ad2
services/core/java/com/android/server/wm/AppWindowAnimator.java
services/core/java/com/android/server/wm/DisplayContent.java
services/core/java/com/android/server/wm/TaskSnapshotSurface.java
services/core/java/com/android/server/wm/WindowAnimator.java
services/core/java/com/android/server/wm/WindowState.java