Choreographer.FrameData
public
static
class
Choreographer.FrameData
extends Object
| java.lang.Object | |
| ↳ | android.view.Choreographer.FrameData |
The payload for VsyncCallback which includes frame information such as when
the frame started being rendered, and multiple possible frame timelines and their
information including deadline and expected present time.
Summary
Public methods | |
|---|---|
long
|
getFrameTimeNanos()
The time in nanoseconds when the frame started being rendered. |
FrameTimeline[]
|
getFrameTimelines()
The possible frame timelines, sorted chronologically. |
Choreographer.FrameTimeline
|
getPreferredFrameTimeline()
The platform-preferred frame timeline. |
Inherited methods | |
|---|---|
Public methods
getFrameTimeNanos
public long getFrameTimeNanos ()
The time in nanoseconds when the frame started being rendered.
This method provides an adjusted timestamp in nanoseconds when the frame started being
rendered. In the past it was recommended to use this timestamp for animations. However,
using this timestamp for animations, causes animations to skip forward after late frames,
which introduces undesired jank. Instead, use ERROR(/#getAnimationTimeNanos()) for
smoother animations. Only use this timestamps for frame timing information (e.g.
comparing to current time, frame deadlines, etc.).
| Returns | |
|---|---|
long |
|
getFrameTimelines
public FrameTimeline[] getFrameTimelines ()
The possible frame timelines, sorted chronologically.
| Returns | |
|---|---|
FrameTimeline[] |
This value cannot be null. |
getPreferredFrameTimeline
public Choreographer.FrameTimeline getPreferredFrameTimeline ()
The platform-preferred frame timeline.
| Returns | |
|---|---|
Choreographer.FrameTimeline |
This value cannot be null. |