Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
9
10#include "include/core/SkRect.h"
11#include "src/base/SkTLazy.h"
12
13namespace sksg {
14
16
17void InvalidationController::inval(const SkRect& r, const SkMatrix& ctm) {
18 if (r.isEmpty()) {
19 return;
20 }
21
23
24 if (!ctm.isIdentity()) {
25 ctm.mapRect(rect.writable());
26 }
27
28 fRects.push_back(*rect);
29 fBounds.join(*rect);
30}
31
33 fRects.clear();
34 fBounds.setEmpty();
35}
36
37} // namespace sksg
const SkRect fBounds
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
bool isIdentity() const
Definition SkMatrix.h:223
void inval(const SkRect &, const SkMatrix &ctm=SkMatrix::I())
Definition Skottie.h:32
bool isEmpty() const
Definition SkRect.h:693
void join(const SkRect &r)
Definition SkRect.cpp:126
void setEmpty()
Definition SkRect.h:842