Flutter Engine
The Flutter Engine
SkSGInvalidationController.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 SkSGInvalidationController_DEFINED
9#define SkSGInvalidationController_DEFINED
10
12#include "include/core/SkRect.h"
14
15#include <vector>
16
17namespace sksg {
18
19/**
20 * Receiver for invalidation events.
21 *
22 * Tracks dirty regions for repaint.
23 */
25public:
29
30 void inval(const SkRect&, const SkMatrix& ctm = SkMatrix::I());
31
32 const SkRect& bounds() const { return fBounds; }
33
34 auto begin() const { return fRects.cbegin(); }
35 auto end() const { return fRects.cend(); }
36
37 void reset();
38
39private:
40 std::vector<SkRect> fRects;
41 SkRect fBounds;
42};
43
44} // namespace sksg
45
46#endif // SkSGInvalidationController_DEFINED
static const SkMatrix & I()
Definition: SkMatrix.cpp:1544
void inval(const SkRect &, const SkMatrix &ctm=SkMatrix::I())
InvalidationController(const InvalidationController &)=delete
InvalidationController & operator=(const InvalidationController &)=delete
Definition: Skottie.h:32