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

Side by Side Diff: src/gpu/GrBatchFontCache.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/gpu/GrBatchAtlas.cpp ('k') | src/gpu/GrBatchFontCache.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 2015 Google Inc. 2 * Copyright 2015 Google Inc.
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 #ifndef GrBatchFontCache_DEFINED 8 #ifndef GrBatchFontCache_DEFINED
9 #define GrBatchFontCache_DEFINED 9 #define GrBatchFontCache_DEFINED
10 10
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 }; 193 };
194 static_assert(SK_ARRAY_COUNT(sAtlasIndices) == kMaskFormatCount, "array_ size_mismatch"); 194 static_assert(SK_ARRAY_COUNT(sAtlasIndices) == kMaskFormatCount, "array_ size_mismatch");
195 195
196 SkASSERT(sAtlasIndices[format] < kMaskFormatCount); 196 SkASSERT(sAtlasIndices[format] < kMaskFormatCount);
197 return sAtlasIndices[format]; 197 return sAtlasIndices[format];
198 } 198 }
199 199
200 bool initAtlas(GrMaskFormat); 200 bool initAtlas(GrMaskFormat);
201 201
202 GrBatchTextStrike* generateStrike(GrFontScaler* scaler) { 202 GrBatchTextStrike* generateStrike(GrFontScaler* scaler) {
203 GrBatchTextStrike* strike = SkNEW_ARGS(GrBatchTextStrike, (this, scaler- >getKey())); 203 GrBatchTextStrike* strike = new GrBatchTextStrike(this, scaler->getKey() );
204 fCache.add(strike); 204 fCache.add(strike);
205 return strike; 205 return strike;
206 } 206 }
207 207
208 GrBatchAtlas* getAtlas(GrMaskFormat format) const { 208 GrBatchAtlas* getAtlas(GrMaskFormat format) const {
209 int atlasIndex = MaskFormatToAtlasIndex(format); 209 int atlasIndex = MaskFormatToAtlasIndex(format);
210 SkASSERT(fAtlases[atlasIndex]); 210 SkASSERT(fAtlases[atlasIndex]);
211 return fAtlases[atlasIndex]; 211 return fAtlases[atlasIndex];
212 } 212 }
213 213
214 static void HandleEviction(GrBatchAtlas::AtlasID, void*); 214 static void HandleEviction(GrBatchAtlas::AtlasID, void*);
215 215
216 GrContext* fContext; 216 GrContext* fContext;
217 SkTDynamicHash<GrBatchTextStrike, GrFontDescKey> fCache; 217 SkTDynamicHash<GrBatchTextStrike, GrFontDescKey> fCache;
218 GrBatchAtlas* fAtlases[kMaskFormatCount]; 218 GrBatchAtlas* fAtlases[kMaskFormatCount];
219 GrBatchTextStrike* fPreserveStrike; 219 GrBatchTextStrike* fPreserveStrike;
220 GrBatchAtlasConfig fAtlasConfigs[kMaskFormatCount]; 220 GrBatchAtlasConfig fAtlasConfigs[kMaskFormatCount];
221 }; 221 };
222 222
223 #endif 223 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrBatchAtlas.cpp ('k') | src/gpu/GrBatchFontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698