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

Side by Side Diff: src/pdf/SkPDFFormXObject.cpp

Issue 1773033002: SkPDF: use sk_make_sp<T> when it makes sense. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-03-08 (Tuesday) 06:54:33 EST Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 The Android Open Source Project 3 * Copyright 2010 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkPDFFormXObject.h" 10 #include "SkPDFFormXObject.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 */ 58 */
59 void SkPDFFormXObject::init(const char* colorSpace, 59 void SkPDFFormXObject::init(const char* colorSpace,
60 SkPDFDict* resourceDict, SkPDFArray* bbox) { 60 SkPDFDict* resourceDict, SkPDFArray* bbox) {
61 this->insertName("Type", "XObject"); 61 this->insertName("Type", "XObject");
62 this->insertName("Subtype", "Form"); 62 this->insertName("Subtype", "Form");
63 this->insertObject("Resources", SkRef(resourceDict)); 63 this->insertObject("Resources", SkRef(resourceDict));
64 this->insertObject("BBox", SkRef(bbox)); 64 this->insertObject("BBox", SkRef(bbox));
65 65
66 // Right now SkPDFFormXObject is only used for saveLayer, which implies 66 // Right now SkPDFFormXObject is only used for saveLayer, which implies
67 // isolated blending. Do this conditionally if that changes. 67 // isolated blending. Do this conditionally if that changes.
68 sk_sp<SkPDFDict> group(new SkPDFDict("Group")); 68 auto group = sk_make_sp<SkPDFDict>("Group");
69 group->insertName("S", "Transparency"); 69 group->insertName("S", "Transparency");
70 70
71 if (colorSpace != nullptr) { 71 if (colorSpace != nullptr) {
72 group->insertName("CS", colorSpace); 72 group->insertName("CS", colorSpace);
73 } 73 }
74 group->insertBool("I", true); // Isolated. 74 group->insertBool("I", true); // Isolated.
75 this->insertObject("Group", group.release()); 75 this->insertObject("Group", group.release());
76 } 76 }
77 77
78 SkPDFFormXObject::~SkPDFFormXObject() {} 78 SkPDFFormXObject::~SkPDFFormXObject() {}
OLDNEW
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698