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

Unified Diff: src/pdf/SkPDFDocument.h

Issue 1916093002: SkDocument/PDF: new API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-04-26 (Tuesday) 15:55:33 EDT Created 4 years, 8 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 | « src/pdf/SkPDFCanon.h ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDocument.h
diff --git a/src/pdf/SkPDFDocument.h b/src/pdf/SkPDFDocument.h
index f5e8a11d842860d0bac4e832bee81a2e7a69fe4f..ec4ffd7122f0c9e35a918d04b00401ca60a10fa5 100644
--- a/src/pdf/SkPDFDocument.h
+++ b/src/pdf/SkPDFDocument.h
@@ -14,12 +14,12 @@
class SkPDFDevice;
-sk_sp<SkDocument> SkPDFMakeDocument(
- SkWStream* stream,
- void (*doneProc)(SkWStream*, bool),
- SkScalar rasterDpi,
- SkPixelSerializer* jpegEncoder,
- bool pdfa);
+sk_sp<SkDocument> SkPDFMakeDocument(SkWStream* stream,
+ void (*doneProc)(SkWStream*, bool),
+ SkScalar rasterDpi,
+ const SkDocument::PDFMetadata&,
+ sk_sp<SkPixelSerializer>,
+ bool pdfa);
// Logically part of SkPDFDocument (like SkPDFCanon), but separate to
// keep similar functionality together.
@@ -34,7 +34,7 @@ struct SkPDFObjectSerializer : SkNoncopyable {
SkPDFObjectSerializer();
~SkPDFObjectSerializer();
void addObjectRecursively(const sk_sp<SkPDFObject>&);
- void serializeHeader(SkWStream*, const SkPDFMetadata&);
+ void serializeHeader(SkWStream*, const SkDocument::PDFMetadata&);
void serializeObjects(SkWStream*);
void serializeFooter(SkWStream*, const sk_sp<SkPDFObject>, sk_sp<SkPDFObject>);
int32_t offset(SkWStream*);
@@ -48,17 +48,20 @@ public:
SkPDFDocument(SkWStream*,
void (*)(SkWStream*, bool),
SkScalar,
- SkPixelSerializer*,
+ const SkDocument::PDFMetadata&,
+ sk_sp<SkPixelSerializer>,
bool);
virtual ~SkPDFDocument();
SkCanvas* onBeginPage(SkScalar, SkScalar, const SkRect&) override;
void onEndPage() override;
bool onClose(SkWStream*) override;
void onAbort() override;
+#ifdef SK_SUPPORT_LEGACY_DOCUMENT_API
void setMetadata(const SkDocument::Attribute[],
int,
const SkTime::DateTime*,
const SkTime::DateTime*) override;
+#endif // SK_SUPPORT_LEGACY_DOCUMENT_API
/**
Serialize the object, as well as any other objects it
indirectly refers to. If any any other objects have been added
@@ -84,7 +87,7 @@ private:
sk_sp<SkPDFObject> fID;
sk_sp<SkPDFObject> fXMP;
SkScalar fRasterDpi;
- SkPDFMetadata fMetadata;
+ SkDocument::PDFMetadata fMetadata;
bool fPDFA;
};
« no previous file with comments | « src/pdf/SkPDFCanon.h ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698