aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-09-06 09:32:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-06 09:32:13 -0700
commite86134fc703eba776715a9e0fdcb6c4e6f7d60e7 (patch)
tree326882ae8b7808eb31e21959c942ff6c604da983 /src/pdf
parent02f9ed74ead11fcb01a24faa7d93f853e869f1ab (diff)
SkDocument: turn off SK_SUPPORT_LEGACY_DOCUMENT_API
no one seems to be using it. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2299653002 Review-Url: https://codereview.chromium.org/2299653002
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFDocument.cpp20
-rw-r--r--src/pdf/SkPDFDocument.h7
-rw-r--r--src/pdf/SkPDFMetadata.cpp13
-rw-r--r--src/pdf/SkPDFMetadata.h6
4 files changed, 1 insertions, 45 deletions
diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp
index 6122dbd565..8734927901 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -256,26 +256,6 @@ void SkPDFDocument::reset() {
fFonts.reset();
}
-#ifdef SK_SUPPORT_LEGACY_DOCUMENT_API
-void SkPDFDocument::setMetadata(const SkDocument::Attribute info[],
- int infoCount,
- const SkTime::DateTime* creationDate,
- const SkTime::DateTime* modifiedDate) {
- for (int i = 0; i < infoCount; ++i) {
- const SkDocument::Attribute& kv = info[i];
- SkPDFMetadata::SetMetadataByKey(kv.fKey, kv.fValue, &fMetadata);
- }
- if (creationDate) {
- fMetadata.fCreation.fEnabled = true;
- fMetadata.fCreation.fDateTime = *creationDate;
- }
- if (modifiedDate) {
- fMetadata.fModified.fEnabled = true;
- fMetadata.fModified.fDateTime = *modifiedDate;
- }
-}
-#endif // SK_SUPPORT_LEGACY_DOCUMENT_API
-
static sk_sp<SkData> SkSrgbIcm() {
// Source: http://www.argyllcms.com/icclibsrc.html
static const char kProfile[] =
diff --git a/src/pdf/SkPDFDocument.h b/src/pdf/SkPDFDocument.h
index 5221dd2728..eeafbca624 100644
--- a/src/pdf/SkPDFDocument.h
+++ b/src/pdf/SkPDFDocument.h
@@ -55,12 +55,7 @@ public:
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
diff --git a/src/pdf/SkPDFMetadata.cpp b/src/pdf/SkPDFMetadata.cpp
index 46fe461be5..42068843bf 100644
--- a/src/pdf/SkPDFMetadata.cpp
+++ b/src/pdf/SkPDFMetadata.cpp
@@ -43,19 +43,6 @@ static const struct {
};
} // namespace
-#ifdef SK_SUPPORT_LEGACY_DOCUMENT_API
-void SkPDFMetadata::SetMetadataByKey(const SkString& key,
- const SkString& value,
- SkDocument::PDFMetadata* metadata) {
- for (const auto keyValuePtr : gMetadataKeys) {
- if (key.equals(keyValuePtr.key)) {
- metadata->*(keyValuePtr.valuePtr) = value;
- }
- }
-}
-
-#endif
-
sk_sp<SkPDFObject> SkPDFMetadata::MakeDocumentInformationDict(
const SkDocument::PDFMetadata& metadata) {
auto dict = sk_make_sp<SkPDFDict>();
diff --git a/src/pdf/SkPDFMetadata.h b/src/pdf/SkPDFMetadata.h
index d386488222..3091be4d77 100644
--- a/src/pdf/SkPDFMetadata.h
+++ b/src/pdf/SkPDFMetadata.h
@@ -26,11 +26,5 @@ sk_sp<SkPDFObject> MakePdfId(const UUID& doc, const UUID& instance);
sk_sp<SkPDFObject> MakeXMPObject(const SkDocument::PDFMetadata&,
const UUID& doc,
const UUID& instance);
-
-#ifdef SK_SUPPORT_LEGACY_DOCUMENT_API
-void SetMetadataByKey(const SkString& key,
- const SkString& value,
- SkDocument::PDFMetadata*);
-#endif
}
#endif // SkPDFMetadata_DEFINED