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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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') | src/pdf/SkPDFTypes.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 * 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 /** \class SkPDFSharedStream 306 /** \class SkPDFSharedStream
307 307
308 This class takes an asset and assumes that it is backed by 308 This class takes an asset and assumes that it is backed by
309 long-lived shared data (for example, an open file 309 long-lived shared data (for example, an open file
310 descriptor). That is: no memory savings can be made by holding on 310 descriptor). That is: no memory savings can be made by holding on
311 to a compressed version instead. 311 to a compressed version instead.
312 */ 312 */
313 class SkPDFSharedStream : public SkPDFObject { 313 class SkPDFSharedStream : public SkPDFObject {
314 public: 314 public:
315 // Takes ownership of asset. 315 // Takes ownership of asset.
316 SkPDFSharedStream(SkStreamAsset* data) 316 SkPDFSharedStream(SkStreamAsset* data) : fAsset(data), fDict(new SkPDFDict) { SkASSERT(data); }
317 : fAsset(data), fDict(SkNEW(SkPDFDict)) {
318 SkASSERT(data);
319 }
320 SkPDFDict* dict() { return fDict; } 317 SkPDFDict* dict() { return fDict; }
321 void emitObject(SkWStream*, 318 void emitObject(SkWStream*,
322 const SkPDFObjNumMap&, 319 const SkPDFObjNumMap&,
323 const SkPDFSubstituteMap&) const override; 320 const SkPDFSubstituteMap&) const override;
324 void addResources(SkPDFObjNumMap*, 321 void addResources(SkPDFObjNumMap*,
325 const SkPDFSubstituteMap&) const override; 322 const SkPDFSubstituteMap&) const override;
326 323
327 private: 324 private:
328 SkAutoTDelete<SkStreamAsset> fAsset; 325 SkAutoTDelete<SkStreamAsset> fAsset;
329 SkAutoTUnref<SkPDFDict> fDict; 326 SkAutoTUnref<SkPDFDict> fDict;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 376
380 SkPDFObject* operator()(SkPDFObject* o) const { 377 SkPDFObject* operator()(SkPDFObject* o) const {
381 return this->getSubstitute(o); 378 return this->getSubstitute(o);
382 } 379 }
383 380
384 private: 381 private:
385 SkTHashMap<SkPDFObject*, SkPDFObject*> fSubstituteMap; 382 SkTHashMap<SkPDFObject*, SkPDFObject*> fSubstituteMap;
386 }; 383 };
387 384
388 #endif 385 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFShader.cpp ('k') | src/pdf/SkPDFTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698