Index: src/core/SkRecordDraw.cpp |
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp |
index 2bf7076bb05c8cd633acac3820b8b00c4ae3153e..e4c49e4f492a45d32bc4216e8b6c211e4ff33a78 100644 |
--- a/src/core/SkRecordDraw.cpp |
+++ b/src/core/SkRecordDraw.cpp |
@@ -7,8 +7,12 @@ |
#include "SkRecordDraw.h" |
-void SkRecordDraw(const SkRecord& record, SkCanvas* canvas) { |
+void SkRecordDraw(const SkRecord& record, SkCanvas* canvas, SkDrawPictureCallback* callback) { |
+ SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/); |
for (SkRecords::Draw draw(canvas); draw.index() < record.count(); draw.next()) { |
+ if (NULL != callback && callback->abortDrawing()) { |
+ return; |
+ } |
record.visit<void>(draw.index(), draw); |
} |
} |