8 #ifndef SkSGRenderNode_DEFINED
9 #define SkSGRenderNode_DEFINED
76 fCanvas = that.fCanvas;
77 fCtx = std::move(that.fCtx);
78 fMaskShader = std::move(that.fMaskShader);
79 fRestoreCount = that.fRestoreCount;
82 that.fRestoreCount = -1;
109 void*
operator new(size_t) =
delete;
110 void*
operator new(size_t,
void*) =
delete;
138 const std::vector<sk_sp<RenderNode>>&
children()
const {
return fChildren; }
143 std::vector<sk_sp<RenderNode>> fChildren;
SkCanvas provides an interface for drawing, and how the drawing is clipped and transformed.
Definition: SkCanvas.h:99
Base class for image filters.
Definition: SkImageFilter.h:35
SkMatrix holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:53
static const SkMatrix & I()
Returns reference to const identity SkMatrix.
SkPaint controls options applied when drawing.
Definition: SkPaint.h:44
Definition: SkRefCnt.h:119
Clients outside SkSG looking to implement custom render nodes, should derive from this class instead ...
Definition: SkSGRenderNode.h:133
CustomRenderNode(std::vector< sk_sp< RenderNode >> &&children)
~CustomRenderNode() override
bool hasChildrenInval() const
const std::vector< sk_sp< RenderNode > > & children() const
Definition: SkSGRenderNode.h:138
Attaches an ImageFilter (chain) to the render DAG.
Definition: SkSGRenderEffect.h:130
Base class for all scene graph nodes.
Definition: SkSGNode.h:32
const SkRect & bounds() const
Definition: SkSGNode.h:54
friend class RenderNode
Definition: SkSGNode.h:93
Node(uint32_t invalTraits)
Definition: SkSGRenderNode.h:68
ScopedRenderContext && setIsolation(const SkRect &bounds, const SkMatrix &ctm, bool do_isolate)
ScopedRenderContext && modulateColorFilter(sk_sp< SkColorFilter >)
ScopedRenderContext & operator=(ScopedRenderContext &&that)
Definition: SkSGRenderNode.h:75
ScopedRenderContext && modulateBlender(sk_sp< SkBlender >)
ScopedRenderContext(ScopedRenderContext &&that)
Definition: SkSGRenderNode.h:73
const RenderContext * operator->() const
Definition: SkSGRenderNode.h:88
ScopedRenderContext(SkCanvas *, const RenderContext *)
ScopedRenderContext && modulateOpacity(float opacity)
ScopedRenderContext && modulateShader(sk_sp< SkShader >, const SkMatrix &shader_ctm)
ScopedRenderContext && modulateMaskShader(sk_sp< SkShader >, const SkMatrix &ms_ctm)
ScopedRenderContext && setFilterIsolation(const SkRect &bounds, const SkMatrix &ctm, sk_sp< SkImageFilter >)
Base class for nodes which can render to a canvas.
Definition: SkSGRenderNode.h:27
void render(SkCanvas *, const RenderContext *=nullptr) const
const RenderNode * nodeAt(const SkPoint &point) const
virtual const RenderNode * onNodeAt(const SkPoint &p) const =0
virtual void onRender(SkCanvas *, const RenderContext *) const =0
RenderNode(uint32_t inval_traits=0)
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:582
Definition: SkSGRenderNode.h:53
sk_sp< SkBlender > fBlender
Definition: SkSGRenderNode.h:57
sk_sp< SkColorFilter > fColorFilter
Definition: SkSGRenderNode.h:54
void modulatePaint(const SkMatrix &ctm, SkPaint *, bool is_layer_paint=false) const
SkMatrix fShaderCTM
Definition: SkSGRenderNode.h:58
bool requiresIsolation() const
sk_sp< SkShader > fShader
Definition: SkSGRenderNode.h:55
sk_sp< SkShader > fMaskShader
Definition: SkSGRenderNode.h:56
float fOpacity
Definition: SkSGRenderNode.h:60
SkMatrix fMaskCTM
Definition: SkSGRenderNode.h:59