Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a08f3e86 authored by Jeff Brown's avatar Jeff Brown Committed by Android (Google) Code Review
Browse files

Merge "Enable vsync traversals by default."

parents e32a4ac8 ebb2d8d7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -647,7 +647,7 @@ public class ValueAnimator extends Animator {
            // onAnimate to process the next frame of the animations.
            if (!mAnimationScheduled
                    && (!mAnimations.isEmpty() || !mDelayedAnims.isEmpty())) {
                mChoreographer.postAnimationCallback(this, null);
                mChoreographer.postCallback(Choreographer.CALLBACK_ANIMATION, this, null);
                mAnimationScheduled = true;
            }
        }
+166 −214

File changed.

Preview size limit exceeded, changes collapsed.

+13 −8
Original line number Diff line number Diff line
@@ -8983,7 +8983,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
    public void postOnAnimation(Runnable action) {
        final AttachInfo attachInfo = mAttachInfo;
        if (attachInfo != null) {
            attachInfo.mViewRootImpl.mChoreographer.postAnimationCallback(action, null);
            attachInfo.mViewRootImpl.mChoreographer.postCallback(
                    Choreographer.CALLBACK_ANIMATION, action, null);
        } else {
            // Assume that post will succeed later
            ViewRootImpl.getRunQueue().post(action);
@@ -9007,8 +9008,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
    public void postOnAnimationDelayed(Runnable action, long delayMillis) {
        final AttachInfo attachInfo = mAttachInfo;
        if (attachInfo != null) {
            attachInfo.mViewRootImpl.mChoreographer.postAnimationCallbackDelayed(
                    action, null, delayMillis);
            attachInfo.mViewRootImpl.mChoreographer.postCallbackDelayed(
                    Choreographer.CALLBACK_ANIMATION, action, null, delayMillis);
        } else {
            // Assume that post will succeed later
            ViewRootImpl.getRunQueue().postDelayed(action, delayMillis);
@@ -9033,7 +9034,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            final AttachInfo attachInfo = mAttachInfo;
            if (attachInfo != null) {
                attachInfo.mHandler.removeCallbacks(action);
                attachInfo.mViewRootImpl.mChoreographer.removeAnimationCallbacks(action, null);
                attachInfo.mViewRootImpl.mChoreographer.removeCallbacks(
                        Choreographer.CALLBACK_ANIMATION, action, null);
            } else {
                // Assume that post will succeed later
                ViewRootImpl.getRunQueue().removeCallbacks(action);
@@ -12239,8 +12241,9 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
        if (verifyDrawable(who) && what != null) {
            final long delay = when - SystemClock.uptimeMillis();
            if (mAttachInfo != null) {
                mAttachInfo.mViewRootImpl.mChoreographer.postAnimationCallbackDelayed(
                        what, who, Choreographer.subtractFrameDelay(delay));
                mAttachInfo.mViewRootImpl.mChoreographer.postCallbackDelayed(
                        Choreographer.CALLBACK_ANIMATION, what, who,
                        Choreographer.subtractFrameDelay(delay));
            } else {
                ViewRootImpl.getRunQueue().postDelayed(what, delay);
            }
@@ -12256,7 +12259,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
    public void unscheduleDrawable(Drawable who, Runnable what) {
        if (verifyDrawable(who) && what != null) {
            if (mAttachInfo != null) {
                mAttachInfo.mViewRootImpl.mChoreographer.removeAnimationCallbacks(what, who);
                mAttachInfo.mViewRootImpl.mChoreographer.removeCallbacks(
                        Choreographer.CALLBACK_ANIMATION, what, who);
            } else {
                ViewRootImpl.getRunQueue().removeCallbacks(what);
            }
@@ -12274,7 +12278,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
     */
    public void unscheduleDrawable(Drawable who) {
        if (mAttachInfo != null && who != null) {
            mAttachInfo.mViewRootImpl.mChoreographer.removeAnimationCallbacks(null, who);
            mAttachInfo.mViewRootImpl.mChoreographer.removeCallbacks(
                    Choreographer.CALLBACK_ANIMATION, null, who);
        }
    }
+114 −84

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -8664,7 +8664,7 @@ public class WindowManagerService extends IWindowManager.Stub

    void scheduleAnimationLocked() {
        if (!mAnimationScheduled) {
            mChoreographer.postAnimationCallback(mAnimationRunnable, null);
            mChoreographer.postCallback(Choreographer.CALLBACK_ANIMATION, mAnimationRunnable, null);
            mAnimationScheduled = true;
        }
    }