Flutter Engine
The Flutter Engine
|
#include <SkResources.h>
Classes | |
struct | FrameData |
Public Types | |
enum class | SizeFit { kFill = SkMatrix::kFill_ScaleToFit , kStart = SkMatrix::kStart_ScaleToFit , kCenter = SkMatrix::kCenter_ScaleToFit , kEnd = SkMatrix::kEnd_ScaleToFit , kNone } |
Public Member Functions | |
virtual bool | isMultiFrame ()=0 |
virtual sk_sp< SkImage > | getFrame (float t) |
virtual FrameData | getFrameData (float t) |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Image asset proxy interface.
Definition at line 32 of file SkResources.h.
|
strong |
Enumerator | |
---|---|
kFill | |
kStart | |
kCenter | |
kEnd | |
kNone |
Definition at line 55 of file SkResources.h.
DEPRECATED: override getFrameData() instead.
Returns the SkImage for a given frame.
If the image asset is static, getFrame() is only called once, at animation load time. Otherwise, this gets invoked every time the animation time is adjusted (on every seek).
Embedders should cache and serve the same SkImage whenever possible, for efficiency.
t | Frame time code, in seconds, relative to the image layer timeline origin (in-point). |
Reimplemented in skresources::MultiFrameImageAsset.
Definition at line 96 of file SkResources.cpp.
|
virtual |
Returns the payload for a given frame.
If the image asset is static, getFrameData() is only called once, at animation load time. Otherwise, this gets invoked every time the animation time is adjusted (on every seek).
Embedders should cache and serve the same SkImage whenever possible, for efficiency.
t | Frame time code, in seconds, relative to the image layer timeline origin (in-point). |
Reimplemented in skottie::SlotManager::ImageAssetProxy.
Definition at line 100 of file SkResources.cpp.
|
pure virtual |
Returns true if the image asset is animated.
Implemented in skottie::SlotManager::ImageAssetProxy, and skresources::MultiFrameImageAsset.