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

Side by Side Diff: src/pdf/SkPDFTypes.h

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/SkPDFShader.cpp ('k') | no next file » | 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 * Copyright 2010 The Android Open Source Project 2 * Copyright 2010 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SkPDFTypes_DEFINED 9 #ifndef SkPDFTypes_DEFINED
10 #define SkPDFTypes_DEFINED 10 #define SkPDFTypes_DEFINED
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 /** SkPDFUnion::Name(const SkString&) does not assume that the 103 /** SkPDFUnion::Name(const SkString&) does not assume that the
104 passed string is already a valid name and it will escape the 104 passed string is already a valid name and it will escape the
105 string. */ 105 string. */
106 static SkPDFUnion Name(const SkString&); 106 static SkPDFUnion Name(const SkString&);
107 107
108 /** SkPDFUnion::String will encode the passed string. */ 108 /** SkPDFUnion::String will encode the passed string. */
109 static SkPDFUnion String(const SkString&); 109 static SkPDFUnion String(const SkString&);
110 110
111 /** This function DOES take ownership of the object. E.g. 111 /** This function DOES take ownership of the object. E.g.
112 sk_sp<SkPDFDict> dict(new SkPDFDict); 112 auto dict = sk_make_sp<SkPDFDict>();
113 dict->insert(.....); 113 dict->insert(.....);
114 SkPDFUnion u = SkPDFUnion::Object(dict.detach()) */ 114 SkPDFUnion u = SkPDFUnion::Object(dict.detach()) */
115 static SkPDFUnion Object(SkPDFObject*); 115 static SkPDFUnion Object(SkPDFObject*);
116 116
117 /** This function DOES take ownership of the object. E.g. 117 /** This function DOES take ownership of the object. E.g.
118 sk_sp<SkPDFBitmap> image( 118 sk_sp<SkPDFBitmap> image(
119 SkPDFBitmap::Create(fCanon, bitmap)); 119 SkPDFBitmap::Create(fCanon, bitmap));
120 SkPDFUnion u = SkPDFUnion::ObjRef(image.detach()) */ 120 SkPDFUnion u = SkPDFUnion::ObjRef(image.detach()) */
121 static SkPDFUnion ObjRef(SkPDFObject*); 121 static SkPDFUnion ObjRef(SkPDFObject*);
122 122
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 }; 393 };
394 394
395 #ifdef SK_PDF_IMAGE_STATS 395 #ifdef SK_PDF_IMAGE_STATS
396 extern SkAtomic<int> gDrawImageCalls; 396 extern SkAtomic<int> gDrawImageCalls;
397 extern SkAtomic<int> gJpegImageObjects; 397 extern SkAtomic<int> gJpegImageObjects;
398 extern SkAtomic<int> gRegularImageObjects; 398 extern SkAtomic<int> gRegularImageObjects;
399 extern void SkPDFImageDumpStats(); 399 extern void SkPDFImageDumpStats();
400 #endif // SK_PDF_IMAGE_STATS 400 #endif // SK_PDF_IMAGE_STATS
401 401
402 #endif 402 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698