Skia
2D Graphics Library
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 
11 #include "include/core/SkMatrix.h"
12 #include "include/core/SkTypes.h"
13 
14 #include <vector>
15 
16 struct SkRect;
17 
18 namespace sksg {
19 
26 public:
30 
31  void inval(const SkRect&, const SkMatrix& ctm = SkMatrix::I());
32 
33  const SkRect& bounds() const { return fBounds; }
34 
35  auto begin() const { return fRects.cbegin(); }
36  auto end() const { return fRects.cend(); }
37 
38  void reset();
39 
40 private:
41  std::vector<SkRect> fRects;
42  SkRect fBounds;
43 };
44 
45 } // namespace sksg
46 
47 #endif // SkSGInvalidationController_DEFINED
SkMatrix holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:53
static const SkMatrix & I()
Returns reference to const identity SkMatrix.
Receiver for invalidation events.
Definition: SkSGInvalidationController.h:25
InvalidationController & operator=(const InvalidationController &)=delete
void inval(const SkRect &, const SkMatrix &ctm=SkMatrix::I())
InvalidationController(const InvalidationController &)=delete
auto end() const
Definition: SkSGInvalidationController.h:36
const SkRect & bounds() const
Definition: SkSGInvalidationController.h:33
auto begin() const
Definition: SkSGInvalidationController.h:35
Definition: Skottie.h:30
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:582