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

Unified Diff: src/pdf/SkPDFFormXObject.cpp

Issue 1107923002: SkPDF: clean up uses of deprecated calls in other SkPDF classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-04-27 (Monday) 09:04:15 EDT Created 5 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/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFormXObject.cpp
diff --git a/src/pdf/SkPDFFormXObject.cpp b/src/pdf/SkPDFFormXObject.cpp
index 3e765c078cdc2b9c43f7245bb339e610873f7089..07f42facb354bcc907a38264eab7073c37d52c5b 100644
--- a/src/pdf/SkPDFFormXObject.cpp
+++ b/src/pdf/SkPDFFormXObject.cpp
@@ -37,7 +37,7 @@ SkPDFFormXObject::SkPDFFormXObject(SkPDFDevice* device) {
SkASSERT(false);
inverse.reset();
}
- insert("Matrix", SkPDFUtils::MatrixToArray(inverse))->unref();
+ this->insertObject("Matrix", SkPDFUtils::MatrixToArray(inverse));
}
}
@@ -58,10 +58,10 @@ SkPDFFormXObject::SkPDFFormXObject(SkStream* content, SkRect bbox,
*/
void SkPDFFormXObject::init(const char* colorSpace,
SkPDFDict* resourceDict, SkPDFArray* bbox) {
- insertName("Type", "XObject");
- insertName("Subtype", "Form");
- insert("Resources", resourceDict);
- insert("BBox", bbox);
+ this->insertName("Type", "XObject");
+ this->insertName("Subtype", "Form");
+ this->insertObject("Resources", SkRef(resourceDict));
+ this->insertObject("BBox", SkRef(bbox));
// Right now SkPDFFormXObject is only used for saveLayer, which implies
// isolated blending. Do this conditionally if that changes.
@@ -71,8 +71,8 @@ void SkPDFFormXObject::init(const char* colorSpace,
if (colorSpace != NULL) {
group->insertName("CS", colorSpace);
}
- group->insert("I", new SkPDFBool(true))->unref(); // Isolated.
- insert("Group", group.get());
+ group->insertBool("I", true); // Isolated.
+ this->insertObject("Group", group.detach());
}
SkPDFFormXObject::~SkPDFFormXObject() {}
« no previous file with comments | « src/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698