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

Unified Diff: dm/DMSrcSink.cpp

Issue 1837263007: DM: allow vias to work with PDF backend (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 1cffb3cfb574de16de5702b2c201e0e88290bb13..9e9ba9ed82a072edb383ae610294f98d7a640099 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1162,8 +1162,8 @@ static Error draw_to_canvas(Sink* sink, SkBitmap* bitmap, SkWStream* stream, SkS
public:
ProxySrc(SkISize size, const Fn& draw) : fSize(size), fDraw(draw) {}
Error draw(SkCanvas* canvas) const override { return fDraw(canvas); }
- Name name() const override { sk_throw(); return ""; } // Won't be called.
- SkISize size() const override { return fSize; }
+ Name name() const override { return "ProxySrc"; }
+ SkISize size() const override { return fSize; }
private:
SkISize fSize;
const Fn& fDraw;
@@ -1182,7 +1182,8 @@ static Error check_against_reference(const SkBitmap* bitmap, const Src& src, Sin
if (FLAGS_check && bitmap) {
SkBitmap reference;
SkString log;
- Error err = sink->draw(src, &reference, nullptr, &log);
+ SkDynamicMemoryWStream wStream;
+ Error err = sink->draw(src, &reference, &wStream, &log);
// If we can draw into this Sink via some pipeline, we should be able to draw directly.
SkASSERT(err.isEmpty());
if (!err.isEmpty()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698