Skia
2D Graphics Library
skottie::PrecompInterceptor Class Referenceabstract

Interface for intercepting pre-composed layer creation. More...

#include <ExternalLayer.h>

Inheritance diagram for skottie::PrecompInterceptor:

Public Member Functions

virtual sk_sp< ExternalLayeronLoadPrecomp (const char id[], const char name[], const SkSize &size)=0
 Invoked at animation build time, for each precomp layer. More...
 
bool unique () const
 May return true if the caller is the only owner. More...
 
void ref () const
 Increment the reference count. More...
 
void unref () const
 Decrement the reference count. More...
 

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).

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).

◆ ref()

void SkRefCntBase::ref ( ) const
inlineinherited

Increment the reference count.

Must be balanced by a call to unref().

◆ unique()

bool SkRefCntBase::unique ( ) const
inlineinherited

May return true if the caller is the only owner.

Ensures that all previous owner's actions are complete.

◆ unref()

void SkRefCntBase::unref ( ) const
inlineinherited

Decrement the reference count.

If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.


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