Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
skottie::internal::MaskShaderEffectBase Class Referenceabstract

#include <Effects.h>

Inheritance diagram for skottie::internal::MaskShaderEffectBase:
skottie::internal::AnimatablePropertyContainer skottie::internal::Animator SkRefCnt SkRefCntBase

Classes

struct  MaskInfo
 

Public Member Functions

const sk_sp< sksg::MaskShaderEffect > & node () const
 
- Public Member Functions inherited from skottie::internal::AnimatablePropertyContainer
template<typename T >
bool bind (const AnimationBuilder &, const skjson::ObjectValue *, T *)
 
template<typename T >
bool bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jobject, T &v)
 
bool bindAutoOrientable (const AnimationBuilder &abuilder, const skjson::ObjectValue *jobject, SkV2 *v, float *orientation)
 
bool isStatic () const
 
template<>
bool bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, ScalarValue *v)
 
template<>
bool bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, ShapeValue *v)
 
template<>
bool bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, TextValue *v)
 
template<>
bool bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, Vec2Value *v)
 
template<>
bool bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, VectorValue *v)
 
template<>
bool bind (const AnimationBuilder &abuilder, const skjson::ObjectValue *jprop, ColorValue *v)
 
- Public Member Functions inherited from skottie::internal::Animator
StateChanged seek (float t)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Protected Member Functions

 MaskShaderEffectBase (sk_sp< sksg::RenderNode >, const SkSize &)
 
const SkSizelayerSize () const
 
virtual MaskInfo onMakeMask () const =0
 
- Protected Member Functions inherited from skottie::internal::AnimatablePropertyContainer
void shrink_to_fit ()
 
void attachDiscardableAdapter (sk_sp< AnimatablePropertyContainer >)
 
- Protected Member Functions inherited from skottie::internal::Animator
 Animator ()=default
 

Private Member Functions

void onSync () final
 

Additional Inherited Members

- Public Types inherited from skottie::internal::Animator
using StateChanged = bool
 

Detailed Description

Base class for mask-shader-related effects.

Definition at line 152 of file Effects.h.

Constructor & Destructor Documentation

◆ MaskShaderEffectBase()

skottie::internal::MaskShaderEffectBase::MaskShaderEffectBase ( sk_sp< sksg::RenderNode child,
const SkSize ls 
)
protected

Definition at line 194 of file Effects.cpp.

195 : fMaskEffectNode(sksg::MaskShaderEffect::Make(std::move(child)))
196 , fLayerSize(ls) {}
static sk_sp< MaskShaderEffect > Make(sk_sp< RenderNode >, sk_sp< SkShader >=nullptr)

Member Function Documentation

◆ layerSize()

const SkSize & skottie::internal::MaskShaderEffectBase::layerSize ( ) const
inlineprotected

Definition at line 159 of file Effects.h.

159{ return fLayerSize; }

◆ node()

const sk_sp< sksg::MaskShaderEffect > & skottie::internal::MaskShaderEffectBase::node ( ) const
inline

Definition at line 154 of file Effects.h.

154{ return fMaskEffectNode; }

◆ onMakeMask()

virtual MaskInfo skottie::internal::MaskShaderEffectBase::onMakeMask ( ) const
protectedpure virtual

◆ onSync()

void skottie::internal::MaskShaderEffectBase::onSync ( )
finalprivatevirtual

Implements skottie::internal::AnimatablePropertyContainer.

Definition at line 198 of file Effects.cpp.

198 {
199 const auto minfo = this->onMakeMask();
200
201 fMaskEffectNode->setVisible(minfo.fVisible);
202 fMaskEffectNode->setShader(std::move(minfo.fMaskShader));
203}
virtual MaskInfo onMakeMask() const =0

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