OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |