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); |
} |
} |