Skip to content

Commit ebb2d8d

Browse files
author
Jeff Brown
committed
Enable vsync traversals by default.
Improved how the various callbacks are managed and sequenced to reduce code duplication. Added a heuristic to avoid postponing traversals until the next vsync frame if we did not actually do any drawing during the previous frame. This helps in the very common case where drawing occurs in response to input. Change-Id: I277d9eeaf50408f8745a3cfd181db1d140770658
1 parent 7082516 commit ebb2d8d

File tree

5 files changed

+295
-308
lines changed

5 files changed

+295
-308
lines changed

core/java/android/animation/ValueAnimator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ private void doAnimationFrame() {
647647
// onAnimate to process the next frame of the animations.
648648
if (!mAnimationScheduled
649649
&& (!mAnimations.isEmpty() || !mDelayedAnims.isEmpty())) {
650-
mChoreographer.postAnimationCallback(this, null);
650+
mChoreographer.postCallback(Choreographer.CALLBACK_ANIMATION, this, null);
651651
mAnimationScheduled = true;
652652
}
653653
}

0 commit comments

Comments
 (0)