Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 4137154e99ecc95b81e90d6791c45adf663a7c63..394b84fa7bd568a6a44a0235cff6bfb08a1201f7 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -23,6 +23,7 @@ |
#include "SkRandom.h" |
#include "SkRecordDraw.h" |
#include "SkRecorder.h" |
+#include "SkRemote.h" |
#include "SkSVGCanvas.h" |
#include "SkScaledCodec.h" |
#include "SkStream.h" |
@@ -1016,6 +1017,16 @@ Error ViaPipe::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkStrin |
}); |
} |
+Error ViaRemote::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkString* log) const { |
+ return draw_to_canvas(fSink, bitmap, stream, log, src.size(), [&](SkCanvas* canvas) { |
+ SkAutoTDelete<SkRemote::Cache> cache(fCache ? SkRemote::Cache::CreateAlwaysCache() |
+ : SkRemote::Cache::CreateNeverCache()); |
+ SkRemote::Server server(canvas); |
+ SkRemote::Client client(cache, &server); |
+ return src.draw(&client); |
+ }); |
+} |
+ |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
Error ViaSerialization::draw( |