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 21 matching lines...) Expand all Loading... |
32 GrTextStrike(GrFontCache*, const GrKey* fontScalerKey, GrMaskFormat, GrAtlas
Mgr*); | 32 GrTextStrike(GrFontCache*, const GrKey* fontScalerKey, GrMaskFormat, GrAtlas
Mgr*); |
33 ~GrTextStrike(); | 33 ~GrTextStrike(); |
34 | 34 |
35 const GrKey* getFontScalerKey() const { return fFontScalerKey; } | 35 const GrKey* getFontScalerKey() const { return fFontScalerKey; } |
36 GrFontCache* getFontCache() const { return fFontCache; } | 36 GrFontCache* getFontCache() const { return fFontCache; } |
37 GrMaskFormat getMaskFormat() const { return fMaskFormat; } | 37 GrMaskFormat getMaskFormat() const { return fMaskFormat; } |
38 | 38 |
39 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*); | 39 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*); |
40 bool addGlyphToAtlas(GrGlyph*, GrFontScaler*); | 40 bool addGlyphToAtlas(GrGlyph*, GrFontScaler*); |
41 | 41 |
| 42 SkISize getAtlasSize() const { return fAtlas.getSize(); } |
| 43 |
42 // testing | 44 // testing |
43 int countGlyphs() const { return fCache.getArray().count(); } | 45 int countGlyphs() const { return fCache.getArray().count(); } |
44 const GrGlyph* glyphAt(int index) const { | 46 const GrGlyph* glyphAt(int index) const { |
45 return fCache.getArray()[index]; | 47 return fCache.getArray()[index]; |
46 } | 48 } |
47 | 49 |
48 // remove any references to this plot | 50 // remove any references to this plot |
49 void removePlot(const GrPlot* plot); | 51 void removePlot(const GrPlot* plot); |
50 | 52 |
51 public: | 53 public: |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 122 |
121 GrGpu* fGpu; | 123 GrGpu* fGpu; |
122 GrAtlasMgr* fAtlasMgr[kAtlasCount]; | 124 GrAtlasMgr* fAtlasMgr[kAtlasCount]; |
123 | 125 |
124 GrTextStrike* generateStrike(GrFontScaler*, const Key&); | 126 GrTextStrike* generateStrike(GrFontScaler*, const Key&); |
125 inline void detachStrikeFromList(GrTextStrike*); | 127 inline void detachStrikeFromList(GrTextStrike*); |
126 void purgeStrike(GrTextStrike* strike); | 128 void purgeStrike(GrTextStrike* strike); |
127 }; | 129 }; |
128 | 130 |
129 #endif | 131 #endif |
OLD | NEW |