aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/utils/SkNoDrawCanvas.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/utils/SkNoDrawCanvas.h')
-rw-r--r--include/utils/SkNoDrawCanvas.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/utils/SkNoDrawCanvas.h b/include/utils/SkNoDrawCanvas.h
index d21d678f16..7b3eaf6b18 100644
--- a/include/utils/SkNoDrawCanvas.h
+++ b/include/utils/SkNoDrawCanvas.h
@@ -28,6 +28,11 @@ public:
// TODO: investigate the users of this ctor.
SkNoDrawCanvas(const SkIRect&);
+ // Optimization to reset state to be the same as after construction.
+ void resetCanvas(int width, int height) {
+ resetForNextPicture(SkIRect::MakeWH(width, height));
+ }
+
protected:
SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec& rec) override;