pre-api change, preparing for expanding metadata

Bug: skia:
Change-Id: I367c728172f24166fb7f06a6e22fe37adb8adc4f
Reviewed-on: https://skia-review.googlesource.com/84880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
Mike Reed 2017-12-13 20:36:46 -05:00 committed by Skia Commit-Bot
parent a119425941
commit af978a3428
3 changed files with 7 additions and 3 deletions

View File

@ -139,6 +139,8 @@ public:
nullptr, false);
}
static sk_sp<SkDocument> MakePDF(SkWStream* stream, const PDFMetadata& metadata);
/**
* Create a PDF-backed document, writing the results into a file.
*/

View File

@ -462,3 +462,7 @@ sk_sp<SkDocument> SkDocument::MakePDF(SkWStream* stream,
return SkPDFMakeDocument(stream, nullptr, dpi, metadata,
std::move(jpegEncoder), pdfa);
}
sk_sp<SkDocument> SkDocument::MakePDF(SkWStream* stream, const PDFMetadata& metadata) {
return MakePDF(stream, SK_ScalarDefaultRasterDPI, metadata, nullptr, false);
}

View File

@ -179,7 +179,6 @@ static sk_sp<SkDocument> MakePDFDocument(const Config &config,
pdf_info.fSubject = config.subject.value.c_str();
pdf_info.fKeywords = config.keywords.value.c_str();
pdf_info.fCreator = config.creator.value.c_str();
bool pdfa = false;
#if 0
SkTime::DateTime now;
SkTime::GetDateTime(&now);
@ -189,8 +188,7 @@ static sk_sp<SkDocument> MakePDFDocument(const Config &config,
pdf_info.fModified.fDateTime = now;
pdfa = true;
#endif
return SkDocument::MakePDF(wStream, SK_ScalarDefaultRasterDPI, pdf_info,
nullptr, pdfa);
return SkDocument::MakePDF(wStream, pdf_info);
}
int main(int argc, char **argv) {