Index: src/core/SkMiniRecorder.h |
diff --git a/src/core/SkMiniRecorder.h b/src/core/SkMiniRecorder.h |
index d01aedaceac249d31b4f0b32cd001ef2c0c83884..914eccc2e38a5c9b26b8f0224d051049ac64dea6 100644 |
--- a/src/core/SkMiniRecorder.h |
+++ b/src/core/SkMiniRecorder.h |
@@ -27,6 +27,12 @@ public: |
// Detach anything we've recorded as a picture, resetting this SkMiniRecorder. |
SkPicture* detachAsPicture(const SkRect& cull); |
+ // Flush anything we've recorded to the canvas, resetting this SkMiniRecorder. |
+ // This is logically the same as but rather more efficient than: |
+ // SkAutoTUnref<SkPicture> pic(this->detachAsPicture(SkRect::MakeEmpty())); |
+ // pic->playback(canvas); |
+ void flushAndReset(SkCanvas*); |
+ |
private: |
enum class State { kEmpty, kDrawPath, kDrawRect, kDrawTextBlob }; |