Flutter Engine
The Flutter Engine
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
11#include "include/core/SkRect.h"
14
15#include <cstdint>
16
17class SkCanvas;
18class SkMatrix;
19struct SkPoint;
20
21namespace sksg {
22class InvalidationController;
23
24/**
25 * Base class for nodes which apply some transformation when rendering
26 * their descendants.
27 *
28 * This includes transforms, clipping, filters, etc.
29 */
30class EffectNode : public RenderNode {
31protected:
32 explicit EffectNode(sk_sp<RenderNode>, uint32_t inval_traits = 0);
33 ~EffectNode() override;
34
35 void onRender(SkCanvas*, const RenderContext*) const override;
36 const RenderNode* onNodeAt(const SkPoint&) const override;
37
39
40 const sk_sp<RenderNode>& getChild() const { return fChild; }
41
42private:
43 sk_sp<RenderNode> fChild;
44
45 using INHERITED = RenderNode;
46};
47
48} // namespace sksg
49
50#endif // SkSGEffectNode_DEFINED
const sk_sp< RenderNode > & getChild() const
EffectNode(sk_sp< RenderNode >, uint32_t inval_traits=0)
const RenderNode * onNodeAt(const SkPoint &) const override
void onRender(SkCanvas *, const RenderContext *) const override
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
~EffectNode() override
friend class RenderNode
Definition: SkSGNode.h:94
Definition: Skottie.h:32