Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
skottie::SlotManager::ImageAssetProxy Class Referencefinal
Inheritance diagram for skottie::SlotManager::ImageAssetProxy:
skresources::ImageAsset SkRefCnt SkRefCntBase

Public Member Functions

 ImageAssetProxy (sk_sp< skresources::ImageAsset > asset)
 
bool isMultiFrame () override
 
FrameData getFrameData (float t) override
 
void setImageAsset (sk_sp< skresources::ImageAsset > asset)
 
sk_sp< const skresources::ImageAssetgetImageAsset () const
 
- Public Member Functions inherited from skresources::ImageAsset
virtual sk_sp< SkImagegetFrame (float t)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Public Types inherited from skresources::ImageAsset
enum class  SizeFit {
  kFill = SkMatrix::kFill_ScaleToFit , kStart = SkMatrix::kStart_ScaleToFit , kCenter = SkMatrix::kCenter_ScaleToFit , kEnd = SkMatrix::kEnd_ScaleToFit ,
  kNone
}
 

Detailed Description

Definition at line 22 of file SlotManager.cpp.

Constructor & Destructor Documentation

◆ ImageAssetProxy()

skottie::SlotManager::ImageAssetProxy::ImageAssetProxy ( sk_sp< skresources::ImageAsset asset)
inlineexplicit

Definition at line 24 of file SlotManager.cpp.

25 : fImageAsset(std::move(asset)) {}

Member Function Documentation

◆ getFrameData()

FrameData skottie::SlotManager::ImageAssetProxy::getFrameData ( float  t)
inlineoverridevirtual

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.

Parameters
tFrame time code, in seconds, relative to the image layer timeline origin (in-point).

Reimplemented from skresources::ImageAsset.

Definition at line 30 of file SlotManager.cpp.

30 {
31 if (fImageAsset) {
32 return fImageAsset->getFrameData(t);
33 }
36 }
static const SkMatrix & I()
virtual FrameData getFrameData(float t)

◆ getImageAsset()

sk_sp< const skresources::ImageAsset > skottie::SlotManager::ImageAssetProxy::getImageAsset ( ) const
inline

Definition at line 42 of file SlotManager.cpp.

42 {
43 return fImageAsset;
44 }

◆ isMultiFrame()

bool skottie::SlotManager::ImageAssetProxy::isMultiFrame ( )
inlineoverridevirtual

Returns true if the image asset is animated.

Implements skresources::ImageAsset.

Definition at line 28 of file SlotManager.cpp.

28{ return true; }

◆ setImageAsset()

void skottie::SlotManager::ImageAssetProxy::setImageAsset ( sk_sp< skresources::ImageAsset asset)
inline

Definition at line 38 of file SlotManager.cpp.

38 {
39 fImageAsset = std::move(asset);
40 }

The documentation for this class was generated from the following file: