Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
sksg::BlenderEffect Class Referencefinal

#include <SkSGRenderEffect.h>

Inheritance diagram for sksg::BlenderEffect:
sksg::EffectNode sksg::RenderNode sksg::Node SkRefCnt SkRefCntBase

Public Member Functions

 ~BlenderEffect () override
 
- Public Member Functions inherited from sksg::RenderNode
void render (SkCanvas *, const RenderContext *=nullptr) const
 
const RenderNodenodeAt (const SkPoint &point) const
 
bool isVisible () const
 
void setVisible (bool)
 
- Public Member Functions inherited from sksg::Node
const SkRectrevalidate (InvalidationController *, const SkMatrix &)
 
void invalidate (bool damage=true)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Static Public Member Functions

static sk_sp< BlenderEffectMake (sk_sp< RenderNode > child, sk_sp< SkBlender >=nullptr)
 

Protected Member Functions

void onRender (SkCanvas *, const RenderContext *) const override
 
const RenderNodeonNodeAt (const SkPoint &) const override
 
- Protected Member Functions inherited from sksg::EffectNode
 EffectNode (sk_sp< RenderNode >, uint32_t inval_traits=0)
 
 ~EffectNode () override
 
void onRender (SkCanvas *, const RenderContext *) const override
 
const RenderNodeonNodeAt (const SkPoint &) const override
 
SkRect onRevalidate (InvalidationController *, const SkMatrix &) override
 
const sk_sp< RenderNode > & getChild () const
 
- Protected Member Functions inherited from sksg::RenderNode
 RenderNode (uint32_t inval_traits=0)
 
virtual void onRender (SkCanvas *, const RenderContext *) const =0
 
virtual const RenderNodeonNodeAt (const SkPoint &p) const =0
 
- Protected Member Functions inherited from sksg::Node
 Node (uint32_t invalTraits)
 
 ~Node () override
 
const SkRectbounds () const
 
bool hasInval () const
 
virtual SkRect onRevalidate (InvalidationController *, const SkMatrix &ctm)=0
 
void observeInval (const sk_sp< Node > &)
 
void unobserveInval (const sk_sp< Node > &)
 

Additional Inherited Members

- Protected Types inherited from sksg::Node
enum  InvalTraits { kBubbleDamage_Trait = 1 << 0 , kOverrideDamage_Trait = 1 << 1 }
 

Detailed Description

Applies an SkBlender to descendant render nodes.

Definition at line 242 of file SkSGRenderEffect.h.

Constructor & Destructor Documentation

◆ ~BlenderEffect()

sksg::BlenderEffect::~BlenderEffect ( )
overridedefault

Member Function Documentation

◆ Make()

sk_sp< BlenderEffect > sksg::BlenderEffect::Make ( sk_sp< RenderNode child,
sk_sp< SkBlender blender = nullptr 
)
static

Definition at line 199 of file SkSGRenderEffect.cpp.

199 {
200 return child ? sk_sp<BlenderEffect>(new BlenderEffect(std::move(child), std::move(blender)))
201 : nullptr;
202}

◆ onNodeAt()

const RenderNode * sksg::BlenderEffect::onNodeAt ( const SkPoint p) const
overrideprotectedvirtual

Reimplemented from sksg::EffectNode.

Definition at line 216 of file SkSGRenderEffect.cpp.

216 {
217 // TODO: we likely need to do something more sophisticated than delegate to descendants here.
218 return this->INHERITED::onNodeAt(p);
219}
const RenderNode * onNodeAt(const SkPoint &) const override

◆ onRender()

void sksg::BlenderEffect::onRender ( SkCanvas canvas,
const RenderContext ctx 
) const
overrideprotectedvirtual

Reimplemented from sksg::EffectNode.

Definition at line 210 of file SkSGRenderEffect.cpp.

210 {
211 const auto local_ctx = ScopedRenderContext(canvas, ctx).modulateBlender(fBlender);
212
213 this->INHERITED::onRender(canvas, local_ctx);
214}
void onRender(SkCanvas *, const RenderContext *) const override

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