Loading core/java/android/view/Choreographer.java +9 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.util.TimeUtils; import android.view.animation.AnimationUtils; import java.io.PrintWriter; import java.util.Locale; /** * Coordinates the timing of animations, input and drawing. Loading Loading @@ -200,6 +201,7 @@ public final class Choreographer { private final DisplayEventReceiver.VsyncEventData mLastVsyncEventData = new DisplayEventReceiver.VsyncEventData(); private final FrameData mFrameData = new FrameData(); private volatile boolean mInDoFrameCallback = false; /** * Contains information about the current frame for jank-tracking, Loading Loading @@ -818,6 +820,11 @@ public final class Choreographer { * @hide */ public long getVsyncId() { if (!mInDoFrameCallback && Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) { String message = String.format(Locale.getDefault(), "unsync-vsync-id=%d isSfChoreo=%s", mLastVsyncEventData.preferredFrameTimeline().vsyncId, this == getSfInstance()); Trace.instant(Trace.TRACE_TAG_VIEW, message); } return mLastVsyncEventData.preferredFrameTimeline().vsyncId; } Loading Loading @@ -853,6 +860,7 @@ public final class Choreographer { if (Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) { Trace.traceBegin( Trace.TRACE_TAG_VIEW, "Choreographer#doFrame " + timeline.mVsyncId); mInDoFrameCallback = true; } synchronized (mLock) { if (!mFrameScheduled) { Loading Loading @@ -947,6 +955,7 @@ public final class Choreographer { doCallbacks(Choreographer.CALLBACK_COMMIT, frameIntervalNanos); } finally { AnimationUtils.unlockAnimationClock(); mInDoFrameCallback = false; if (resynced) { Trace.traceEnd(Trace.TRACE_TAG_VIEW); } Loading Loading
core/java/android/view/Choreographer.java +9 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import android.util.TimeUtils; import android.view.animation.AnimationUtils; import java.io.PrintWriter; import java.util.Locale; /** * Coordinates the timing of animations, input and drawing. Loading Loading @@ -200,6 +201,7 @@ public final class Choreographer { private final DisplayEventReceiver.VsyncEventData mLastVsyncEventData = new DisplayEventReceiver.VsyncEventData(); private final FrameData mFrameData = new FrameData(); private volatile boolean mInDoFrameCallback = false; /** * Contains information about the current frame for jank-tracking, Loading Loading @@ -818,6 +820,11 @@ public final class Choreographer { * @hide */ public long getVsyncId() { if (!mInDoFrameCallback && Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) { String message = String.format(Locale.getDefault(), "unsync-vsync-id=%d isSfChoreo=%s", mLastVsyncEventData.preferredFrameTimeline().vsyncId, this == getSfInstance()); Trace.instant(Trace.TRACE_TAG_VIEW, message); } return mLastVsyncEventData.preferredFrameTimeline().vsyncId; } Loading Loading @@ -853,6 +860,7 @@ public final class Choreographer { if (Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) { Trace.traceBegin( Trace.TRACE_TAG_VIEW, "Choreographer#doFrame " + timeline.mVsyncId); mInDoFrameCallback = true; } synchronized (mLock) { if (!mFrameScheduled) { Loading Loading @@ -947,6 +955,7 @@ public final class Choreographer { doCallbacks(Choreographer.CALLBACK_COMMIT, frameIntervalNanos); } finally { AnimationUtils.unlockAnimationClock(); mInDoFrameCallback = false; if (resynced) { Trace.traceEnd(Trace.TRACE_TAG_VIEW); } Loading