Flutter Engine
The Flutter Engine
Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
SkSVGFeMerge Class Reference

#include <SkSVGFeMerge.h>

Inheritance diagram for SkSVGFeMerge:
SkSVGFe SkSVGHiddenContainer SkSVGContainer SkSVGTransformableNode SkSVGNode SkRefCnt SkRefCntBase

Static Public Member Functions

static sk_sp< SkSVGFeMergeMake ()
 
- Static Public Member Functions inherited from SkSVGFe
static bool IsFilterEffect (const sk_sp< SkSVGNode > &node)
 

Static Public Attributes

static constexpr SkSVGTag tag = SkSVGTag::kFeMerge
 

Protected Member Functions

sk_sp< SkImageFilteronMakeImageFilter (const SkSVGRenderContext &, const SkSVGFilterContext &) const override
 
std::vector< SkSVGFeInputTypegetInputs () const override
 
- Protected Member Functions inherited from SkSVGFe
 SkSVGFe (SkSVGTag t)
 
virtual sk_sp< SkImageFilteronMakeImageFilter (const SkSVGRenderContext &, const SkSVGFilterContext &) const =0
 
virtual std::vector< SkSVGFeInputTypegetInputs () const =0
 
bool parseAndSetAttribute (const char *, const char *) override
 
- Protected Member Functions inherited from SkSVGHiddenContainer
 SkSVGHiddenContainer (SkSVGTag t)
 
void onRender (const SkSVGRenderContext &) const final
 
- Protected Member Functions inherited from SkSVGContainer
 SkSVGContainer (SkSVGTag)
 
void onRender (const SkSVGRenderContext &) const override
 
SkPath onAsPath (const SkSVGRenderContext &) const override
 
SkRect onObjectBoundingBox (const SkSVGRenderContext &) const override
 
bool hasChildren () const final
 
template<typename NodeType , typename Func >
void forEachChild (Func func) const
 
- Protected Member Functions inherited from SkSVGTransformableNode
 SkSVGTransformableNode (SkSVGTag)
 
bool onPrepareToRender (SkSVGRenderContext *) const override
 
void onSetAttribute (SkSVGAttribute, const SkSVGValue &) override
 
void mapToParent (SkPath *) const
 
void mapToParent (SkRect *) const
 
- Protected Member Functions inherited from SkSVGNode
 SkSVGNode (SkSVGTag)
 
virtual bool onPrepareToRender (SkSVGRenderContext *) const
 
virtual void onRender (const SkSVGRenderContext &) const =0
 
virtual bool onAsPaint (const SkSVGRenderContext &, SkPaint *) const
 
virtual SkPath onAsPath (const SkSVGRenderContext &) const =0
 
virtual void onSetAttribute (SkSVGAttribute, const SkSVGValue &)
 
virtual bool hasChildren () const
 
virtual SkRect onObjectBoundingBox (const SkSVGRenderContext &) const
 

Additional Inherited Members

- Public Member Functions inherited from SkSVGFe
sk_sp< SkImageFiltermakeImageFilter (const SkSVGRenderContext &ctx, const SkSVGFilterContext &fctx) const
 
SkRect resolveFilterSubregion (const SkSVGRenderContext &, const SkSVGFilterContext &) const
 
virtual SkSVGColorspace resolveColorspace (const SkSVGRenderContext &, const SkSVGFilterContext &) const
 
void applyProperties (SkSVGRenderContext *) const
 
- Public Member Functions inherited from SkSVGContainer
void appendChild (sk_sp< SkSVGNode >) override
 
- Public Member Functions inherited from SkSVGTransformableNode
void setTransform (const SkSVGTransformType &t)
 
- Public Member Functions inherited from SkSVGNode
 ~SkSVGNode () override
 
SkSVGTag tag () const
 
virtual void appendChild (sk_sp< SkSVGNode >)=0
 
void render (const SkSVGRenderContext &) const
 
bool asPaint (const SkSVGRenderContext &, SkPaint *) const
 
SkPath asPath (const SkSVGRenderContext &) const
 
SkRect objectBoundingBox (const SkSVGRenderContext &) const
 
void setAttribute (SkSVGAttribute, const SkSVGValue &)
 
bool setAttribute (const char *attributeName, const char *attributeValue)
 
virtual bool parseAndSetAttribute (const char *name, const char *value)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 
- Static Protected Member Functions inherited from SkSVGNode
static SkMatrix ComputeViewboxMatrix (const SkRect &, const SkRect &, SkSVGPreserveAspectRatio)
 
- Protected Attributes inherited from SkSVGContainer
skia_private::STArray< 1, sk_sp< SkSVGNode >, truefChildren
 

Detailed Description

Definition at line 37 of file SkSVGFeMerge.h.

Member Function Documentation

◆ getInputs()

std::vector< SkSVGFeInputType > SkSVGFeMerge::getInputs ( ) const
overrideprotectedvirtual

Implements SkSVGFe.

Definition at line 37 of file SkSVGFeMerge.cpp.

37 {
38 std::vector<SkSVGFeInputType> inputs;
39 inputs.reserve(fChildren.size());
40
41 this->forEachChild<SkSVGFeMergeNode>([&](const SkSVGFeMergeNode* child) {
42 inputs.push_back(child->getIn());
43 });
44
45 return inputs;
46}
skia_private::STArray< 1, sk_sp< SkSVGNode >, true > fChildren
int size() const
Definition: SkTArray.h:421

◆ Make()

static sk_sp< SkSVGFeMerge > SkSVGFeMerge::Make ( )
inlinestatic

Definition at line 41 of file SkSVGFeMerge.h.

◆ onMakeImageFilter()

sk_sp< SkImageFilter > SkSVGFeMerge::onMakeImageFilter ( const SkSVGRenderContext ctx,
const SkSVGFilterContext fctx 
) const
overrideprotectedvirtual

Implements SkSVGFe.

Definition at line 21 of file SkSVGFeMerge.cpp.

22 {
23 const SkSVGColorspace colorspace = this->resolveColorspace(ctx, fctx);
24
26 merge_node_filters.reserve(fChildren.size());
27
28 this->forEachChild<SkSVGFeMergeNode>([&](const SkSVGFeMergeNode* child) {
29 merge_node_filters.push_back(fctx.resolveInput(ctx, child->getIn(), colorspace));
30 });
31
32 return SkImageFilters::Merge(merge_node_filters.data(),
33 merge_node_filters.size(),
34 this->resolveFilterSubregion(ctx, fctx));
35}
SkSVGColorspace
Definition: SkSVGTypes.h:719
static sk_sp< SkImageFilter > Merge(sk_sp< SkImageFilter > *const filters, int count, const CropRect &cropRect={})
virtual SkSVGColorspace resolveColorspace(const SkSVGRenderContext &, const SkSVGFilterContext &) const
Definition: SkSVGFe.cpp:84
sk_sp< SkImageFilter > resolveInput(const SkSVGRenderContext &, const SkSVGFeInputType &) const
void reserve(int n)
Definition: SkTArray.h:170

Member Data Documentation

◆ tag

constexpr SkSVGTag SkSVGFeMerge::tag = SkSVGTag::kFeMerge
staticconstexpr

Definition at line 39 of file SkSVGFeMerge.h.


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