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

Unified Diff: dm/DMSrcSink.cpp

Issue 1359943003: SkPDF: add basic metadata support (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: unused parameter 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 | « no previous file | include/core/SkDocument.h » ('j') | include/core/SkDocument.h » ('J')
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 981e47d6c0bf84690c25c8a49392fa2e3abadc18..22e8961447f3d2e090f413dcfa48aecfce206ffc 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -929,6 +929,12 @@ Error PDFSink::draw(const Src& src, SkBitmap*, SkWStream* dst, SkString*) const
if (!doc) {
return "SkDocument::CreatePDF() returned nullptr";
}
+ SkTArray<SkDocument::Attribute> info;
+ info.emplace_back(SkString("Title"), src.name());
+ info.emplace_back(SkString("Subject"),
+ SkString("rendering correctness test"));
+ info.emplace_back(SkString("Creator"), SkString("Skia/DM"));
+ doc->setMetadata(info, nullptr, nullptr);
return draw_skdocument(src, doc.get(), dst);
}
« no previous file with comments | « no previous file | include/core/SkDocument.h » ('j') | include/core/SkDocument.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698