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

Side by Side Diff: src/core/SkPictureFlat.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/core/SkPictureData.cpp ('k') | src/core/SkPictureFlat.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 2011 Google Inc. 3 * Copyright 2011 Google Inc.
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 #ifndef SkPictureFlat_DEFINED 8 #ifndef SkPictureFlat_DEFINED
9 #define SkPictureFlat_DEFINED 9 #define SkPictureFlat_DEFINED
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 buffer.setTypefaceArray((SkTypeface**)fArray, fCount); 128 buffer.setTypefaceArray((SkTypeface**)fArray, fCount);
129 } 129 }
130 130
131 protected: 131 protected:
132 int fCount; 132 int fCount;
133 SkRefCnt** fArray; 133 SkRefCnt** fArray;
134 }; 134 };
135 135
136 class SkFactoryPlayback { 136 class SkFactoryPlayback {
137 public: 137 public:
138 SkFactoryPlayback(int count) : fCount(count) { 138 SkFactoryPlayback(int count) : fCount(count) { fArray = new SkFlattenable::F actory[count]; }
139 fArray = SkNEW_ARRAY(SkFlattenable::Factory, count);
140 }
141 139
142 ~SkFactoryPlayback() { 140 ~SkFactoryPlayback() { delete[] fArray; }
143 SkDELETE_ARRAY(fArray);
144 }
145 141
146 SkFlattenable::Factory* base() const { return fArray; } 142 SkFlattenable::Factory* base() const { return fArray; }
147 143
148 void setupBuffer(SkReadBuffer& buffer) const { 144 void setupBuffer(SkReadBuffer& buffer) const {
149 buffer.setFactoryPlayback(fArray, fCount); 145 buffer.setFactoryPlayback(fArray, fCount);
150 } 146 }
151 147
152 private: 148 private:
153 int fCount; 149 int fCount;
154 SkFlattenable::Factory* fArray; 150 SkFlattenable::Factory* fArray;
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 bool fReady; 553 bool fReady;
558 554
559 // For index -> SkFlatData. 0-based, while all indices in the API are 1-bas ed. Careful! 555 // For index -> SkFlatData. 0-based, while all indices in the API are 1-bas ed. Careful!
560 SkTDArray<const SkFlatData*> fIndexedData; 556 SkTDArray<const SkFlatData*> fIndexedData;
561 557
562 // For SkFlatData -> cached SkFlatData, which has index(). 558 // For SkFlatData -> cached SkFlatData, which has index().
563 SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash; 559 SkTDynamicHash<SkFlatData, SkFlatData, SkFlatData::HashTraits> fHash;
564 }; 560 };
565 561
566 #endif 562 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureData.cpp ('k') | src/core/SkPictureFlat.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698