Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
modules
sksg
src
SkSGEffectNode.cpp
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
#include "
modules/sksg/include/SkSGEffectNode.h
"
8
9
#include "
include/private/base/SkAssert.h
"
10
#include "
modules/sksg/include/SkSGNode.h
"
11
12
#include <utility>
13
14
class
SkCanvas
;
15
class
SkMatrix
;
16
struct
SkPoint
;
17
18
namespace
sksg
{
19
class
InvalidationController;
20
21
EffectNode::EffectNode
(
sk_sp<RenderNode>
child, uint32_t inval_traits)
22
:
INHERITED
(inval_traits)
23
, fChild(
std
::move(child)) {
24
this->
observeInval
(fChild);
25
}
26
27
EffectNode::~EffectNode
() {
28
this->
unobserveInval
(fChild);
29
}
30
31
void
EffectNode::onRender
(
SkCanvas
* canvas,
const
RenderContext
* ctx)
const
{
32
fChild->render(canvas, ctx);
33
}
34
35
const
RenderNode
*
EffectNode::onNodeAt
(
const
SkPoint
& p)
const
{
36
return
fChild->nodeAt(p);
37
}
38
39
SkRect
EffectNode::onRevalidate
(
InvalidationController
* ic,
const
SkMatrix
& ctm) {
40
SkASSERT
(this->
hasInval
());
41
42
return
fChild->revalidate(ic, ctm);
43
}
44
45
}
// namespace sksg
SkAssert.h
SkASSERT
#define SkASSERT(cond)
Definition
SkAssert.h:116
SkSGEffectNode.h
SkSGNode.h
SkCanvas
Definition
SkCanvas.h:106
SkMatrix
Definition
SkMatrix.h:54
sk_sp
Definition
SkRefCnt.h:220
sksg::EffectNode::EffectNode
EffectNode(sk_sp< RenderNode >, uint32_t inval_traits=0)
Definition
SkSGEffectNode.cpp:21
sksg::EffectNode::onNodeAt
const RenderNode * onNodeAt(const SkPoint &) const override
Definition
SkSGEffectNode.cpp:35
sksg::EffectNode::onRender
void onRender(SkCanvas *, const RenderContext *) const override
Definition
SkSGEffectNode.cpp:31
sksg::EffectNode::onRevalidate
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
Definition
SkSGEffectNode.cpp:39
sksg::EffectNode::~EffectNode
~EffectNode() override
Definition
SkSGEffectNode.cpp:27
sksg::InvalidationController
Definition
SkSGInvalidationController.h:24
sksg::Node::observeInval
void observeInval(const sk_sp< Node > &)
Definition
SkSGNode.cpp:61
sksg::Node::unobserveInval
void unobserveInval(const sk_sp< Node > &)
Definition
SkSGNode.cpp:84
sksg::Node::hasInval
bool hasInval() const
Definition
SkSGNode.h:60
sksg::RenderNode
Definition
SkSGRenderNode.h:34
sksg
Definition
Skottie.h:32
std
Definition
ref_ptr.h:256
SkPoint
Definition
SkPoint_impl.h:163
SkRect
Definition
extension.cpp:13
sksg::RenderNode::RenderContext
Definition
SkSGRenderNode.h:60
Generated on Fri Apr 26 2024 06:16:23 for Flutter Engine by
1.9.8