[sksg] Clean up public headers

Change-Id: I0a6627f9b8d47e51c82c89ff1df75c3add8e8035
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267919
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Florin Malita 2020-01-30 16:12:06 -05:00 committed by Skia Commit-Bot
parent 22d08b536b
commit b82c0ece7e
3 changed files with 11 additions and 9 deletions

View File

@ -10,7 +10,8 @@
#include "include/core/SkMatrix.h" #include "include/core/SkMatrix.h"
#include "include/core/SkTypes.h" #include "include/core/SkTypes.h"
#include "include/private/SkTDArray.h"
#include <vector>
struct SkRect; struct SkRect;
@ -29,15 +30,16 @@ public:
void inval(const SkRect&, const SkMatrix& ctm = SkMatrix::I()); void inval(const SkRect&, const SkMatrix& ctm = SkMatrix::I());
const SkRect& bounds() const { return fBounds; } const SkRect& bounds() const { return fBounds; }
const SkRect* begin() const { return fRects.begin(); }
const SkRect* end() const { return fRects.end(); } auto begin() const { return fRects.cbegin(); }
auto end() const { return fRects.cend(); }
void reset(); void reset();
private: private:
SkTDArray<SkRect> fRects; std::vector<SkRect> fRects;
SkRect fBounds; SkRect fBounds;
}; };
} // namespace sksg } // namespace sksg

View File

@ -10,8 +10,8 @@
#include "modules/sksg/include/SkSGEffectNode.h" #include "modules/sksg/include/SkSGEffectNode.h"
#include "include/core/SkMatrix.h" class SkM44;
#include "include/private/SkM44.h" class SkMatrix;
namespace sksg { namespace sksg {

View File

@ -30,7 +30,7 @@ void InvalidationController::inval(const SkRect& r, const SkMatrix& ctm) {
} }
void InvalidationController::reset() { void InvalidationController::reset() {
fRects.reset(); fRects.clear();
fBounds.setEmpty(); fBounds.setEmpty();
} }