Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Unified Diff: src/core/SkMiniRecorder.h

Issue 1144173002: More efficient SkRecorder::flushMiniRecorder() (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: spelling Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkMiniRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 };
« no previous file with comments | « no previous file | src/core/SkMiniRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698