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

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

Issue 1772493002: SkPDF: AutoTUnref<T> changes in use (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 This class takes an asset and assumes that it is backed by 312 This class takes an asset and assumes that it is backed by
313 long-lived shared data (for example, an open file 313 long-lived shared data (for example, an open file
314 descriptor). That is: no memory savings can be made by holding on 314 descriptor). That is: no memory savings can be made by holding on
315 to a compressed version instead. 315 to a compressed version instead.
316 */ 316 */
317 class SkPDFSharedStream final : public SkPDFObject { 317 class SkPDFSharedStream final : public SkPDFObject {
318 public: 318 public:
319 // Takes ownership of asset. 319 // Takes ownership of asset.
320 SkPDFSharedStream(SkStreamAsset* data) : fAsset(data), fDict(new SkPDFDict) { SkASSERT(data); } 320 SkPDFSharedStream(SkStreamAsset* data) : fAsset(data), fDict(new SkPDFDict) { SkASSERT(data); }
321 SkPDFDict* dict() { return fDict; } 321 SkPDFDict* dict() { return fDict.get(); }
322 void emitObject(SkWStream*, 322 void emitObject(SkWStream*,
323 const SkPDFObjNumMap&, 323 const SkPDFObjNumMap&,
324 const SkPDFSubstituteMap&) const override; 324 const SkPDFSubstituteMap&) const override;
325 void addResources(SkPDFObjNumMap*, 325 void addResources(SkPDFObjNumMap*,
326 const SkPDFSubstituteMap&) const override; 326 const SkPDFSubstituteMap&) const override;
327 327
328 private: 328 private:
329 SkAutoTDelete<SkStreamAsset> fAsset; 329 SkAutoTDelete<SkStreamAsset> fAsset;
330 SkAutoTUnref<SkPDFDict> fDict; 330 SkAutoTUnref<SkPDFDict> fDict;
331 typedef SkPDFObject INHERITED; 331 typedef SkPDFObject INHERITED;
(...skipping 61 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