FrameData
class FrameData
| kotlin.Any | |
| ↳ | 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 | |
|---|---|
| open Long |
The time in nanoseconds when the frame started being rendered. |
| open Array<Choreographer.FrameTimeline!> |
The possible frame timelines, sorted chronologically. |
| open Choreographer.FrameTimeline |
The platform-preferred frame timeline. |
Public methods
getFrameTimeNanos
open fun getFrameTimeNanos(): Long
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 #getAnimationTimeNanos() for smoother animations. Only use this timestamps for frame timing information (e.g. comparing to current time, frame deadlines, etc.).
getFrameTimelines
open fun getFrameTimelines(): Array<Choreographer.FrameTimeline!>
The possible frame timelines, sorted chronologically.
| Return | |
|---|---|
Array<Choreographer.FrameTimeline!> |
This value cannot be null. |
getPreferredFrameTimeline
open fun getPreferredFrameTimeline(): Choreographer.FrameTimeline
The platform-preferred frame timeline.
| Return | |
|---|---|
Choreographer.FrameTimeline |
This value cannot be null. |