Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
modules
sksg
include
SkSGClipEffect.h
Go to the documentation of this file.
1
/*
2
* Copyright 2018 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 SkSGClipEffect_DEFINED
9
#define SkSGClipEffect_DEFINED
10
11
#include "
include/core/SkRect.h
"
12
#include "
include/core/SkRefCnt.h
"
13
#include "
modules/sksg/include/SkSGEffectNode.h
"
14
#include "
modules/sksg/include/SkSGGeometryNode.h
"
15
#include "
modules/sksg/include/SkSGRenderNode.h
"
16
17
#include <utility>
18
19
class
SkCanvas
;
20
class
SkMatrix
;
21
struct
SkPoint
;
22
23
namespace
sksg
{
24
class
InvalidationController;
25
26
/**
27
* Concrete Effect node, applying a clip to its descendants.
28
*
29
*/
30
class
ClipEffect
final :
public
EffectNode
{
31
public
:
32
static
sk_sp<ClipEffect>
Make
(
sk_sp<RenderNode>
child,
sk_sp<GeometryNode>
clip
,
33
bool
aa =
false
,
bool
force_clip =
false
) {
34
return
(child &&
clip
)
35
?
sk_sp<ClipEffect>
(
new
ClipEffect
(std::move(child), std::move(
clip
), aa, force_clip))
36
:
nullptr
;
37
}
38
39
~ClipEffect
()
override
;
40
41
protected
:
42
ClipEffect
(
sk_sp<RenderNode>
,
sk_sp<GeometryNode>
,
bool
aa,
bool
force_clip);
43
44
void
onRender
(
SkCanvas
*,
const
RenderContext*)
const override
;
45
const
RenderNode
*
onNodeAt
(
const
SkPoint
&)
const override
;
46
47
SkRect
onRevalidate
(
InvalidationController
*,
const
SkMatrix
&)
override
;
48
49
private
:
50
const
sk_sp<GeometryNode>
fClipNode;
51
const
bool
fAntiAlias,
52
fForceClip;
53
54
bool
fNoop =
false
;
55
56
using
INHERITED =
EffectNode
;
57
};
58
59
}
// namespace sksg
60
61
#endif
// SkSGClipEffect_DEFINED
clip
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
Definition
SkPath.cpp:3824
SkRect.h
SkRefCnt.h
SkSGEffectNode.h
SkSGGeometryNode.h
SkSGRenderNode.h
SkCanvas
Definition
SkCanvas.h:106
SkMatrix
Definition
SkMatrix.h:54
sk_sp
Definition
SkRefCnt.h:220
sksg::ClipEffect
Definition
SkSGClipEffect.h:30
sksg::ClipEffect::~ClipEffect
~ClipEffect() override
Definition
SkSGClipEffect.cpp:30
sksg::ClipEffect::onRender
void onRender(SkCanvas *, const RenderContext *) const override
Definition
SkSGClipEffect.cpp:34
sksg::ClipEffect::Make
static sk_sp< ClipEffect > Make(sk_sp< RenderNode > child, sk_sp< GeometryNode > clip, bool aa=false, bool force_clip=false)
Definition
SkSGClipEffect.h:32
sksg::ClipEffect::onRevalidate
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
Definition
SkSGClipEffect.cpp:47
sksg::ClipEffect::onNodeAt
const RenderNode * onNodeAt(const SkPoint &) const override
Definition
SkSGClipEffect.cpp:43
sksg::EffectNode
Definition
SkSGEffectNode.h:30
sksg::InvalidationController
Definition
SkSGInvalidationController.h:24
sksg::RenderNode
Definition
SkSGRenderNode.h:34
sksg
Definition
Skottie.h:32
SkPoint
Definition
SkPoint_impl.h:163
SkRect
Definition
extension.cpp:13
Generated on Fri Apr 26 2024 06:16:23 for Flutter Engine by
1.9.8