| 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 19 matching lines...) Expand all Loading... |
| 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 GrTexture* getTexture() const { return fAtlas->getTexture(); } |
| 38 | 38 |
| 39 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*); | 39 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*); |
| 40 // returns true if glyph (or glyph+padding for distance field) |
| 41 // is too large to ever fit in texture atlas subregions (GrPlots) |
| 42 bool glyphTooLargeForAtlas(GrGlyph*); |
| 43 // returns true if glyph successfully added to texture atlas, false otherwis
e |
| 40 bool addGlyphToAtlas(GrGlyph*, GrFontScaler*); | 44 bool addGlyphToAtlas(GrGlyph*, GrFontScaler*); |
| 41 | 45 |
| 42 // testing | 46 // testing |
| 43 int countGlyphs() const { return fCache.count(); } | 47 int countGlyphs() const { return fCache.count(); } |
| 44 | 48 |
| 45 // remove any references to this plot | 49 // remove any references to this plot |
| 46 void removePlot(const GrPlot* plot); | 50 void removePlot(const GrPlot* plot); |
| 47 | 51 |
| 48 static const GrFontDescKey& GetKey(const GrTextStrike& ts) { | 52 static const GrFontDescKey& GetKey(const GrTextStrike& ts) { |
| 49 return *(ts.fFontScalerKey); | 53 return *(ts.fFontScalerKey); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 129 |
| 126 GrGpu* fGpu; | 130 GrGpu* fGpu; |
| 127 GrAtlas* fAtlases[kAtlasCount]; | 131 GrAtlas* fAtlases[kAtlasCount]; |
| 128 | 132 |
| 129 GrTextStrike* generateStrike(GrFontScaler*); | 133 GrTextStrike* generateStrike(GrFontScaler*); |
| 130 inline void detachStrikeFromList(GrTextStrike*); | 134 inline void detachStrikeFromList(GrTextStrike*); |
| 131 void purgeStrike(GrTextStrike* strike); | 135 void purgeStrike(GrTextStrike* strike); |
| 132 }; | 136 }; |
| 133 | 137 |
| 134 #endif | 138 #endif |
| OLD | NEW |