Skia
2D Graphics Library
SkSGEffectNode.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkSGEffectNode_DEFINED
9 #define SkSGEffectNode_DEFINED
10 
12 
13 namespace sksg {
14 
21 class EffectNode : public RenderNode {
22 protected:
23  explicit EffectNode(sk_sp<RenderNode>, uint32_t inval_traits = 0);
24  ~EffectNode() override;
25 
26  void onRender(SkCanvas*, const RenderContext*) const override;
27  const RenderNode* onNodeAt(const SkPoint&) const override;
28 
30 
31  const sk_sp<RenderNode>& getChild() const { return fChild; }
32 
33 private:
34  sk_sp<RenderNode> fChild;
35 
36  using INHERITED = RenderNode;
37 };
38 
39 } // namespace sksg
40 
41 #endif // SkSGEffectNode_DEFINED
SkCanvas provides an interface for drawing, and how the drawing is clipped and transformed.
Definition: SkCanvas.h:99
SkMatrix holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:53
Shared pointer class to wrap classes that support a ref()/unref() interface.
Definition: SkRefCnt.h:220
Base class for nodes which apply some transformation when rendering their descendants.
Definition: SkSGEffectNode.h:21
const RenderNode * onNodeAt(const SkPoint &) const override
EffectNode(sk_sp< RenderNode >, uint32_t inval_traits=0)
void onRender(SkCanvas *, const RenderContext *) const override
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
~EffectNode() override
const sk_sp< RenderNode > & getChild() const
Definition: SkSGEffectNode.h:31
Receiver for invalidation events.
Definition: SkSGInvalidationController.h:25
friend class RenderNode
Definition: SkSGNode.h:93
Base class for nodes which can render to a canvas.
Definition: SkSGRenderNode.h:27
Definition: Skottie.h:30
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:582
Definition: SkSGRenderNode.h:53