Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index f0b10103f7494d17a97ccb4bbbdde447a8afaa61..258e94e7e6bff8a5179073863898c0c17aaed62d 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -15,6 +15,7 @@ |
#include "SkColorSpaceXform.h" |
#include "SkCommonFlags.h" |
#include "SkData.h" |
+#include "SkDeferredCanvas.h" |
#include "SkDocument.h" |
#include "SkError.h" |
#include "SkImageGenerator.h" |
@@ -1439,6 +1440,16 @@ Error ViaPicture::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkSt |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+Error ViaDefer::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkString* log) const { |
+ auto size = src.size(); |
+ return draw_to_canvas(fSink, bitmap, stream, log, size, [&](SkCanvas* canvas) -> Error { |
+ SkDeferredCanvas deferred(canvas); |
+ return src.draw(&deferred); |
+ }); |
+} |
+ |
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+ |
// Draw the Src into two pictures, then draw the second picture into the wrapped Sink. |
// This tests that any shortcuts we may take while recording that second picture are legal. |
Error ViaSecondPicture::draw( |