Use a Choreographer to schedule animation and drawing.
Both animations and drawing need to march to the beat of the same drum, but the animation system doesn't know abgout the view system and vice-versa so neither one can drive the other. We introduce the Choreographer as a drummer to keep everyone in time and ensure a magnificent performance. This patch enabled VSync based animations and drawing by default. Two system properties are provided for testing purposes to control the behavior. "debug.choreographer.vsync": Enables vsync based animation timing. Defaults to true. When false, animations are timed by posting delayed messages to a message queue in the same way they used to be before this patch. "debug.choreographer.animdraw": Enables the use of the animation timer to drive drawing such that drawing is synchronized with animations (in other words, with vsync or the timing loop). Defaults to true. When false, layout traversals and drawing are posted to the message queue for execution without any delay or synchronization in the same way they used to be before this patch. Stubbed out part of the layoutlib animation code because it depends on the old timing loop (opened bug 5712395) Change-Id: I186d9518648e89bc3e809e393e9a9148bbbecc4d
Loading
Please register or sign in to comment