Flutter Engine
The Flutter Engine
|
#include <SkAnimCodecPlayer.h>
Public Member Functions | |
SkAnimCodecPlayer (std::unique_ptr< SkCodec > codec) | |
~SkAnimCodecPlayer () | |
sk_sp< SkImage > | getFrame () |
SkISize | dimensions () const |
uint32_t | duration () const |
bool | seek (uint32_t msec) |
Definition at line 22 of file SkAnimCodecPlayer.h.
SkAnimCodecPlayer::SkAnimCodecPlayer | ( | std::unique_ptr< SkCodec > | codec | ) |
Definition at line 32 of file SkAnimCodecPlayer.cpp.
SkAnimCodecPlayer::~SkAnimCodecPlayer | ( | ) |
Definition at line 54 of file SkAnimCodecPlayer.cpp.
SkISize SkAnimCodecPlayer::dimensions | ( | ) | const |
Return the size of the image(s) that will be returned by getFrame().
Definition at line 56 of file SkAnimCodecPlayer.cpp.
|
inline |
Returns the total duration of the animation in milliseconds. Returns 0 for a single-frame image.
Definition at line 43 of file SkAnimCodecPlayer.h.
Returns the current frame of the animation. This defaults to the first frame for animated codecs (i.e. msec = 0). Calling this multiple times (without calling seek()) will always return the same image object (or null if there was an error).
Definition at line 131 of file SkAnimCodecPlayer.cpp.
bool SkAnimCodecPlayer::seek | ( | uint32_t | msec | ) |
Finds the closest frame associated with the time code (in milliseconds) and sets that to be the current frame (call getFrame() to retrieve that image). Returns true iff this call to seek() changed the "current frame" for the animation. Thus if seek() returns false, then getFrame() will return the same image as it did before this call to seek().
Definition at line 139 of file SkAnimCodecPlayer.cpp.