Choreographer

Class of android.view · Choreographer.java · Android's reference

public final class Choreographer

Frames: input, animation, traversal and commit callbacks, in that order, once for each vsync. The vsync is the window's present pace (snx.android.ui.Window drives frames); without a window, a 60 Hz timer.

Nested types

Fields

public static final int CALLBACK_INPUT = 0 source
public static final int CALLBACK_ANIMATION = 1 source
public static final int CALLBACK_INSETS_ANIMATION = 2 source
public static final int CALLBACK_TRAVERSAL = 3 source
public static final int CALLBACK_COMMIT = 4 source

Methods

public static Choreographer getInstance() source
public static Choreographer getMainThreadInstance() source
public static long getFrameDelay() source
public static void setFrameDelay(long frameDelay) empty body source
public static void setVsyncSource(Runnable request) source

How the window asks for the next vsync: it calls doFrame then. Null for the timer.

public long getFrameTime() source
public long getFrameTimeNanos() source
public long getLastFrameTimeNanos() source
public long getFrameIntervalNanos() source
public void postFrameCallback(FrameCallback callback) source
public void postFrameCallbackDelayed(FrameCallback callback, long delayMillis) source
public void removeFrameCallback(FrameCallback callback) source
public void postCallback(int callbackType, Runnable action, Object token) source
public void postCallbackDelayed(int callbackType, Runnable action, Object token, long delayMillis) source
public void removeCallbacks(int callbackType, Runnable action, Object token) source
public void postVsyncCallback(VsyncCallback callback) source
public void removeVsyncCallback(VsyncCallback callback) empty body source
public void doFrame(long frameTimeNanos) source

A frame: the callbacks due now, by type. The window calls it at each vsync it was asked for.


Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.