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

Side by Side Diff: src/gpu/GrAtlasTextContext.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/GrAtlas.cpp ('k') | src/gpu/GrAtlasTextContext.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 GrAtlasTextContext_DEFINED 8 #ifndef GrAtlasTextContext_DEFINED
9 #define GrAtlasTextContext_DEFINED 9 #define GrAtlasTextContext_DEFINED
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 const char text[], size_t byteL ength, 160 const char text[], size_t byteL ength,
161 const SkScalar pos[], int scala rsPerPosition, 161 const SkScalar pos[], int scala rsPerPosition,
162 const SkPoint& offset, 162 const SkPoint& offset,
163 const SkIRect& regionClipBounds ); 163 const SkIRect& regionClipBounds );
164 164
165 // Distance field text needs this table to compute a value for use in the fr agment shader. 165 // Distance field text needs this table to compute a value for use in the fr agment shader.
166 // Because the GrAtlasTextContext can go out of scope before the final flush , this needs to be 166 // Because the GrAtlasTextContext can go out of scope before the final flush , this needs to be
167 // refcnted and malloced 167 // refcnted and malloced
168 struct DistanceAdjustTable : public SkNVRefCnt<DistanceAdjustTable> { 168 struct DistanceAdjustTable : public SkNVRefCnt<DistanceAdjustTable> {
169 DistanceAdjustTable() { this->buildDistanceAdjustTable(); } 169 DistanceAdjustTable() { this->buildDistanceAdjustTable(); }
170 ~DistanceAdjustTable() { SkDELETE_ARRAY(fTable); } 170 ~DistanceAdjustTable() { delete[] fTable; }
171 171
172 const SkScalar& operator[] (int i) const { 172 const SkScalar& operator[] (int i) const {
173 return fTable[i]; 173 return fTable[i];
174 } 174 }
175 175
176 private: 176 private:
177 void buildDistanceAdjustTable(); 177 void buildDistanceAdjustTable();
178 178
179 SkScalar* fTable; 179 SkScalar* fTable;
180 }; 180 };
181 181
182 GrBatchTextStrike* fCurrStrike; 182 GrBatchTextStrike* fCurrStrike;
183 GrTextBlobCache* fCache; 183 GrTextBlobCache* fCache;
184 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; 184 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable;
185 185
186 friend class GrTextBlobCache; 186 friend class GrTextBlobCache;
187 friend class TextBatch; 187 friend class TextBatch;
188 188
189 #ifdef GR_TEST_UTILS 189 #ifdef GR_TEST_UTILS
190 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); 190 DRAW_BATCH_TEST_FRIEND(TextBlobBatch);
191 #endif 191 #endif
192 192
193 typedef GrTextContext INHERITED; 193 typedef GrTextContext INHERITED;
194 }; 194 };
195 195
196 #endif 196 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAtlas.cpp ('k') | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698