Flutter Engine
The Flutter Engine
third_party
skia
modules
sksg
src
SkSGInvalidationController.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
8
#include "
modules/sksg/include/SkSGInvalidationController.h
"
9
10
#include "
include/core/SkRect.h
"
11
#include "
src/base/SkTLazy.h
"
12
13
namespace
sksg
{
14
15
InvalidationController::InvalidationController
() :
fBounds
(
SkRect
::MakeEmpty()) {}
16
17
void
InvalidationController::inval
(
const
SkRect
& r,
const
SkMatrix
& ctm) {
18
if
(r.
isEmpty
()) {
19
return
;
20
}
21
22
SkTCopyOnFirstWrite<SkRect>
rect
(r);
23
24
if
(!ctm.
isIdentity
()) {
25
ctm.
mapRect
(
rect
.writable());
26
}
27
28
fRects.push_back(*
rect
);
29
fBounds.
join
(*
rect
);
30
}
31
32
void
InvalidationController::reset
() {
33
fRects.clear();
34
fBounds.
setEmpty
();
35
}
36
37
}
// namespace sksg
fBounds
const SkRect fBounds
Definition:
ParsePathTest.cpp:38
SkRect.h
SkSGInvalidationController.h
SkTLazy.h
SkMatrix
Definition:
SkMatrix.h:54
SkMatrix::mapRect
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
Definition:
SkMatrix.cpp:1141
SkMatrix::isIdentity
bool isIdentity() const
Definition:
SkMatrix.h:223
SkTCopyOnFirstWrite
Definition:
SkTLazy.h:139
sksg::InvalidationController::inval
void inval(const SkRect &, const SkMatrix &ctm=SkMatrix::I())
Definition:
SkSGInvalidationController.cpp:17
sksg::InvalidationController::InvalidationController
InvalidationController()
Definition:
SkSGInvalidationController.cpp:15
sksg::InvalidationController::reset
void reset()
Definition:
SkSGInvalidationController.cpp:32
SkRecords::rect
sk_sp< SkBlender > blender SkRect rect
Definition:
SkRecords.h:350
sksg
Definition:
Skottie.h:32
SkRect
Definition:
extension.cpp:13
SkRect::isEmpty
bool isEmpty() const
Definition:
SkRect.h:693
SkRect::join
void join(const SkRect &r)
Definition:
SkRect.cpp:126
SkRect::setEmpty
void setEmpty()
Definition:
SkRect.h:842
Generated on Sun Jun 23 2024 21:56:07 for Flutter Engine by
1.9.4