10 Commits

Author SHA1 Message Date
John Reck
1bcacfdcab Format the world (or just HWUI)
Test: No code changes, just ran through clang-format
Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2017-11-03 10:57:44 -07:00
Doris Liu
4ec05be535 Put VD animators on paused list when RT stops drawing am: c82e879e56
am: 70b6080cd7

Change-Id: I2ad721d1e9a20e5a1946a779ac0e84118b017505
2016-08-02 18:24:42 +00:00
Doris Liu
c82e879e56 Put VD animators on paused list when RT stops drawing
When we stop scheduling for new frames on RenderThread, we should
put the running animations on pause, rather than purge the list
of the running animations, such that in the next full
sync, the animations that were paused will continue to run.

BUG: 30226711
Change-Id: I36ff6f5d26ffa7999f60ca0ff676a35157577dc2
2016-08-01 21:42:15 +00:00
Chih-Hung Hsieh
f53bfc911f resolve merge conflicts of 3fb651b to nyc-mr1-dev-plus-aosp
Change-Id: I52d56e84620c85638798d949f8eb819387a01902
2016-07-21 19:14:36 -07:00
Chih-Hung Hsieh
faecb78a6b Fix google-explicit-constructor warnings in frameworks/base
* Add explicit keyword to conversion constructors.
* Add NOLINT to implicit conversion constructors.

Bug: 28341362
Test: build with clang-tidy
Change-Id: Ie4d37072ab57d1662d18db4de1c8577247f43337
2016-07-21 16:24:06 -07:00
Doris Liu
718cd3eb70 Handle hidden RT VectorDrawable animators
This CL changes the target of VD specific animators to VectorDrawable,
instead of RenderNode. The benefit of doing so is that animators can
now detect whether the animation is meaningful by checking whether
their VD target is in the display list. If not, that means the VD is
not drawing for the current frame, in which case we can be smarter
and more power efficient by removing the animator from the list and
posting a delayed onFinished listener callback.

By setting VD as the animation target, when an ImageView decides to
update its drawable from one AVD to something else, we'll be able
to detect that the previous AVD is no longer in the display list,
and stop providing animation pulse to the stale AVD, which is
something we couldn't do previously.  This change also
handles the case where one AVD instance could be drawn in two
different views.

Bug: 27441375
Change-Id: Iaad1ed09cfd526276b95db0dd695275c28e074e8
2016-06-09 10:27:59 -07:00
John Reck
ec845a215e Fix race condition
Bug: 17372309

 AnimationContext::startFrame() happens both with and without
 the UI thread lock. Pass the TraversalMode into it so
 that ThreadedRenderer's subclass can correctly decide
 when it is safe to push over mPendingAnimatingRenderNodes, as doing
 so outside of the lock is Very Bad.

Change-Id: Ife5dd3a2b46b0a207cd9234c159a674afdbf5efd
2014-09-05 15:23:38 -07:00
John Reck
e2478d45cc Fix some wrong-thread issues around animator management
Bug: 17372309

 Fixes a case where UI thread and RT thread both used the same method
 which wasn't safe for either of them.

 Adds additional assertions & logging in unusual circumstances to
 try and track down where the issue is occuring from.

Change-Id: I93d31a6fd0c5927259b67bdf96a475944226eee6
2014-09-03 17:37:59 -07:00
John Reck
d0cd9db316 Actually end animators on tree destruction
Bug: 17313962

Change-Id: I66b86d50b415f9aa33da23297f22e2cf7f96f565
2014-08-28 08:43:39 -07:00
John Reck
119907cd25 Animator stuff
Bug: 17228458

Change-Id: Id884a429a512f9cd2be0ed16dbd0f10e92b4440d
2014-08-27 17:44:25 -07:00