skia2/modules/sksg/include/SkSGInvalidationController.h
Ben Wagner d5148e3314 Move SkNoncopyable to include/private.
Change-Id: I62f60ea52faeebddecacf03d9429ac3f7c516b8e
Reviewed-on: https://skia-review.googlesource.com/141823
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-07-17 21:39:51 +00:00

44 lines
1.0 KiB
C++

/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSGInvalidationController_DEFINED
#define SkSGInvalidationController_DEFINED
#include "SkMatrix.h"
#include "SkTDArray.h"
#include "SkTypes.h"
struct SkRect;
namespace sksg {
/**
* Receiver for invalidation events.
*
* Tracks dirty regions for repaint.
*/
class InvalidationController {
public:
InvalidationController();
InvalidationController(const InvalidationController&) = delete;
InvalidationController& operator=(const InvalidationController&) = delete;
void inval(const SkRect&, const SkMatrix& ctm = SkMatrix::I());
const SkRect& bounds() const { return fBounds; }
const SkRect* begin() const { return fRects.begin(); }
const SkRect* end() const { return fRects.end(); }
private:
SkTDArray<SkRect> fRects;
SkRect fBounds;
};
} // namespace sksg
#endif // SkSGInvalidationController_DEFINED