com.facebook.fresco.animation.frame.FrameScheduler |
Known Indirect Subclasses |
Frame scheduler used to calculate which frame to display for given animation times.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FRAME_NUMBER_DONE | ||||||||||
int | NO_NEXT_TARGET_RENDER_TIME |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract int |
getFrameNumberToRender(long animationTimeMs, long lastFrameTimeMs)
Get the frame number for the given animation time or
FRAME_NUMBER_DONE if the
animation is over. | ||||||||||
abstract long |
getLoopDurationMs()
Get the loop duration of 1 full loop.
| ||||||||||
abstract long |
getTargetRenderTimeForNextFrameMs(long animationTimeMs)
For a given animation time, calculate the target render time for the next frame in ms.
| ||||||||||
abstract long |
getTargetRenderTimeMs(int frameNumber)
Get the target render time for the given frame number in ms.
| ||||||||||
abstract boolean | isInfiniteAnimation() |
Get the frame number for the given animation time or FRAME_NUMBER_DONE
if the
animation is over.
animationTimeMs | the animation time to get the frame number for |
---|---|
lastFrameTimeMs | the time of the last draw before |
FRAME_NUMBER_DONE
Get the loop duration of 1 full loop.
For a given animation time, calculate the target render time for the next frame in ms. If the
animation is over, this will return NO_NEXT_TARGET_RENDER_TIME
animationTimeMs | the current animation time in ms |
---|
NO_NEXT_TARGET_RENDER_TIME
if the animation is over
Get the target render time for the given frame number in ms.
frameNumber | the frame number to use |
---|