| Index: include/core/SkDocument.h
|
| diff --git a/include/core/SkDocument.h b/include/core/SkDocument.h
|
| index 6ee96b9ce3afed5e69eb1e0fcf20d9a72ac71951..9e1de8ae4e7f412c9bd3527c92e548b9b4119494 100644
|
| --- a/include/core/SkDocument.h
|
| +++ b/include/core/SkDocument.h
|
| @@ -131,7 +131,7 @@ public:
|
| * nullptr. For example:
|
| *
|
| * SkDocument* make_doc(SkWStream* output) {
|
| - * SkTArray<SkDocument::Attribute> info;
|
| + * std::vector<SkDocument::Attribute> info;
|
| * info.emplace_back(SkString("Title"), SkString("..."));
|
| * info.emplace_back(SkString("Author"), SkString("..."));
|
| * info.emplace_back(SkString("Subject"), SkString("..."));
|
| @@ -140,7 +140,7 @@ public:
|
| * SkTime::DateTime now;
|
| * SkTime::GetDateTime(&now);
|
| * SkDocument* doc = SkDocument::CreatePDF(output);
|
| - * doc->setMetadata(info, &now, &now);
|
| + * doc->setMetadata(&info[0], (int)info.size(), &now, &now);
|
| * return doc;
|
| * }
|
| */
|
| @@ -148,10 +148,18 @@ public:
|
| SkString fKey, fValue;
|
| Attribute(const SkString& k, const SkString& v) : fKey(k), fValue(v) {}
|
| };
|
| - virtual void setMetadata(const SkTArray<SkDocument::Attribute>&,
|
| + virtual void setMetadata(const SkDocument::Attribute[],
|
| + int /* attributeCount */,
|
| const SkTime::DateTime* /* creationDate */,
|
| const SkTime::DateTime* /* modifiedDate */) {}
|
|
|
| + // This version is deprecated.
|
| + void setMetadata(const SkTArray<SkDocument::Attribute>& att,
|
| + const SkTime::DateTime* creation,
|
| + const SkTime::DateTime* modified) {
|
| + this->setMetadata(&att[0], att.count(), creation, modified);
|
| + }
|
| +
|
| protected:
|
| SkDocument(SkWStream*, void (*)(SkWStream*, bool aborted));
|
|
|
|
|