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

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

Issue 414573002: Move vertex buffer setup out of drawPackedGlyph(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make sure we release vertex pool; get rid of unnecessary texture ptr. Created 6 years, 4 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/GrDistanceFieldTextContext.cpp ('k') | no next file » | 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 2010 Google Inc. 3 * Copyright 2010 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 8
9 9
10 10
(...skipping 16 matching lines...) Expand all
27 * glyphid->strike 27 * glyphid->strike
28 */ 28 */
29 class GrTextStrike { 29 class GrTextStrike {
30 public: 30 public:
31 GrTextStrike(GrFontCache*, const GrFontDescKey* fontScalerKey, GrMaskFormat, GrAtlas*); 31 GrTextStrike(GrFontCache*, const GrFontDescKey* fontScalerKey, GrMaskFormat, GrAtlas*);
32 ~GrTextStrike(); 32 ~GrTextStrike();
33 33
34 const GrFontDescKey* getFontScalerKey() const { return fFontScalerKey; } 34 const GrFontDescKey* getFontScalerKey() const { return fFontScalerKey; }
35 GrFontCache* getFontCache() const { return fFontCache; } 35 GrFontCache* getFontCache() const { return fFontCache; }
36 GrMaskFormat getMaskFormat() const { return fMaskFormat; } 36 GrMaskFormat getMaskFormat() const { return fMaskFormat; }
37 GrTexture* getTexture() const { return fAtlas->getTexture(); }
37 38
38 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*); 39 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*);
39 bool addGlyphToAtlas(GrGlyph*, GrFontScaler*); 40 bool addGlyphToAtlas(GrGlyph*, GrFontScaler*);
40 41
41 // testing 42 // testing
42 int countGlyphs() const { return fCache.count(); } 43 int countGlyphs() const { return fCache.count(); }
43 44
44 // remove any references to this plot 45 // remove any references to this plot
45 void removePlot(const GrPlot* plot); 46 void removePlot(const GrPlot* plot);
46 47
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 GrGpu* fGpu; 126 GrGpu* fGpu;
126 GrAtlas* fAtlases[kAtlasCount]; 127 GrAtlas* fAtlases[kAtlasCount];
127 128
128 GrTextStrike* generateStrike(GrFontScaler*); 129 GrTextStrike* generateStrike(GrFontScaler*);
129 inline void detachStrikeFromList(GrTextStrike*); 130 inline void detachStrikeFromList(GrTextStrike*);
130 void purgeStrike(GrTextStrike* strike); 131 void purgeStrike(GrTextStrike* strike);
131 }; 132 };
132 133
133 #endif 134 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698