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

Unified Diff: dm/DMSrcSink.cpp

Issue 1376573002: DM: PDFSink sets rasterizer keyword (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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 | « dm/DMSrcSink.h ('k') | tools/dm_flags.json » ('j') | 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 25b5f7b4609c615ee4973c5da44eaa6e83a49fd9..96a0ab1a3ef08c04b9067ca2092e7defe77ea2ff 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -924,7 +924,7 @@ static Error draw_skdocument(const Src& src, SkDocument* doc, SkWStream* dst) {
return "";
}
-PDFSink::PDFSink() {}
+PDFSink::PDFSink(const char* rasterizer) : fRasterizer(rasterizer) {}
Error PDFSink::draw(const Src& src, SkBitmap*, SkWStream* dst, SkString*) const {
SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(dst));
@@ -936,6 +936,9 @@ Error PDFSink::draw(const Src& src, SkBitmap*, SkWStream* dst, SkString*) const
info.emplace_back(SkString("Subject"),
SkString("rendering correctness test"));
info.emplace_back(SkString("Creator"), SkString("Skia/DM"));
+
+ info.emplace_back(SkString("Keywords"),
+ SkStringPrintf("Rasterizer:%s;", fRasterizer));
doc->setMetadata(info, nullptr, nullptr);
return draw_skdocument(src, doc.get(), dst);
}
« no previous file with comments | « dm/DMSrcSink.h ('k') | tools/dm_flags.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698