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

Side by Side Diff: src/gpu/GrTextStrike.cpp

Issue 385263002: Refactor SkGrFontScaler and SkGrFontKey into non-virtual versions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase to ToT Created 6 years, 5 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/GrTextStrike.h ('k') | src/gpu/GrTextStrike_impl.h » ('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 Google Inc. 2 * Copyright 2010 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 #include "GrGpu.h" 8 #include "GrGpu.h"
9 #include "GrRectanizer.h" 9 #include "GrRectanizer.h"
10 #include "GrTextStrike.h" 10 #include "GrTextStrike.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 #endif 213 #endif
214 214
215 /* 215 /*
216 The text strike is specific to a given font/style/matrix setup, which is 216 The text strike is specific to a given font/style/matrix setup, which is
217 represented by the GrHostFontScaler object we are given in getGlyph(). 217 represented by the GrHostFontScaler object we are given in getGlyph().
218 218
219 We map a 32bit glyphID to a GrGlyph record, which in turn points to a 219 We map a 32bit glyphID to a GrGlyph record, which in turn points to a
220 atlas and a position within that texture. 220 atlas and a position within that texture.
221 */ 221 */
222 222
223 GrTextStrike::GrTextStrike(GrFontCache* cache, const GrKey* key, 223 GrTextStrike::GrTextStrike(GrFontCache* cache, const GrFontDescKey* key,
224 GrMaskFormat format, 224 GrMaskFormat format,
225 GrAtlas* atlas) : fPool(64) { 225 GrAtlas* atlas) : fPool(64) {
226 fFontScalerKey = key; 226 fFontScalerKey = key;
227 fFontScalerKey->ref(); 227 fFontScalerKey->ref();
228 228
229 fFontCache = cache; // no need to ref, it won't go away before we do 229 fFontCache = cache; // no need to ref, it won't go away before we do
230 fAtlas = atlas; // no need to ref, it won't go away before we do 230 fAtlas = atlas; // no need to ref, it won't go away before we do
231 231
232 fMaskFormat = format; 232 fMaskFormat = format;
233 233
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 glyph->height(), storage.get(), 318 glyph->height(), storage.get(),
319 &glyph->fAtlasLocation); 319 &glyph->fAtlasLocation);
320 320
321 if (NULL == plot) { 321 if (NULL == plot) {
322 return false; 322 return false;
323 } 323 }
324 324
325 glyph->fPlot = plot; 325 glyph->fPlot = plot;
326 return true; 326 return true;
327 } 327 }
OLDNEW
« no previous file with comments | « src/gpu/GrTextStrike.h ('k') | src/gpu/GrTextStrike_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698