Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
skottie::PrecompInterceptor Class Referenceabstract

#include <ExternalLayer.h>

Inheritance diagram for skottie::PrecompInterceptor:
SkRefCnt SkRefCntBase skottie_utils::ExternalAnimationPrecompInterceptor

Public Member Functions

virtual sk_sp< ExternalLayeronLoadPrecomp (const char id[], const char name[], const SkSize &size)=0
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Detailed Description

Interface for intercepting pre-composed layer creation.

Embedders can register interceptors with animation builders, to substitute target layers with arbitrary/externally-controlled content (see ExternalLayer above).

Definition at line 37 of file ExternalLayer.h.

Member Function Documentation

◆ onLoadPrecomp()

virtual sk_sp< ExternalLayer > skottie::PrecompInterceptor::onLoadPrecomp ( const char  id[],
const char  name[],
const SkSize size 
)
pure virtual

Invoked at animation build time, for each precomp layer.

Parameters
idThe target composition ID (usually assigned automatically by BM: comp_0, ...)
nameThe name of the precomp layer (by default it matches the target comp name, but can be changed in AE)
sizeLottie-specified precomp layer size
Returns
An ExternalLayer implementation (to be used instead of the actual Lottie file content), or nullptr (to use the Lottie file content).

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