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

Unified Diff: src/core/SkRecorder.cpp

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 | « src/core/SkMiniRecorder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecorder.cpp
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 45283f81185f911f89ebd3320642066b13930e95..0989132cd2eb5ff7839e440b9b79d5549a67568d 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -136,10 +136,8 @@ char* SkRecorder::copy(const char* src) {
void SkRecorder::flushMiniRecorder() {
if (fMiniRecorder) {
SkMiniRecorder* mr = fMiniRecorder;
- fMiniRecorder = nullptr; // Needs to happen before p->playback(this) or we loop forever.
- // TODO: this can probably be done more efficiently by SkMiniRecorder if it matters.
- SkAutoTUnref<SkPicture> p(mr->detachAsPicture(SkRect::MakeEmpty()));
- p->playback(this);
+ fMiniRecorder = nullptr; // Needs to happen before flushAndReset() or we recurse forever.
+ mr->flushAndReset(this);
}
}
« no previous file with comments | « src/core/SkMiniRecorder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698