| 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 |
| 11 #ifndef GrTextStrike_DEFINED | 11 #ifndef GrTextStrike_DEFINED |
| 12 #define GrTextStrike_DEFINED | 12 #define GrTextStrike_DEFINED |
| 13 | 13 |
| 14 #include "GrAllocPool.h" | 14 #include "GrAtlas.h" |
| 15 #include "GrDrawTarget.h" |
| 15 #include "GrFontScaler.h" | 16 #include "GrFontScaler.h" |
| 17 #include "GrGlyph.h" |
| 16 #include "SkTDynamicHash.h" | 18 #include "SkTDynamicHash.h" |
| 17 #include "GrGlyph.h" | 19 #include "SkVarAlloc.h" |
| 18 #include "GrDrawTarget.h" | |
| 19 #include "GrAtlas.h" | |
| 20 | 20 |
| 21 class GrFontCache; | 21 class GrFontCache; |
| 22 class GrGpu; | 22 class GrGpu; |
| 23 class GrFontPurgeListener; | 23 class GrFontPurgeListener; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * The textstrike maps a hostfontscaler instance to a dictionary of | 26 * The textstrike maps a hostfontscaler instance to a dictionary of |
| 27 * glyphid->strike | 27 * glyphid->strike |
| 28 */ | 28 */ |
| 29 class GrTextStrike { | 29 class GrTextStrike { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 55 } | 55 } |
| 56 | 56 |
| 57 public: | 57 public: |
| 58 // for easy removal from list | 58 // for easy removal from list |
| 59 GrTextStrike* fPrev; | 59 GrTextStrike* fPrev; |
| 60 GrTextStrike* fNext; | 60 GrTextStrike* fNext; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 SkTDynamicHash<GrGlyph, GrGlyph::PackedID> fCache; | 63 SkTDynamicHash<GrGlyph, GrGlyph::PackedID> fCache; |
| 64 const GrFontDescKey* fFontScalerKey; | 64 const GrFontDescKey* fFontScalerKey; |
| 65 GrTAllocPool<GrGlyph> fPool; | 65 SkVarAlloc fPool; |
| 66 | 66 |
| 67 GrFontCache* fFontCache; | 67 GrFontCache* fFontCache; |
| 68 bool fUseDistanceField; | 68 bool fUseDistanceField; |
| 69 | 69 |
| 70 GrAtlas::ClientPlotUsage fPlotUsage; | 70 GrAtlas::ClientPlotUsage fPlotUsage; |
| 71 | 71 |
| 72 GrGlyph* generateGlyph(GrGlyph::PackedID packed, GrFontScaler* scaler); | 72 GrGlyph* generateGlyph(GrGlyph::PackedID packed, GrFontScaler* scaler); |
| 73 | 73 |
| 74 friend class GrFontCache; | 74 friend class GrFontCache; |
| 75 }; | 75 }; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 GrGpu* fGpu; | 131 GrGpu* fGpu; |
| 132 GrAtlas* fAtlases[kAtlasCount]; | 132 GrAtlas* fAtlases[kAtlasCount]; |
| 133 | 133 |
| 134 GrTextStrike* generateStrike(GrFontScaler*); | 134 GrTextStrike* generateStrike(GrFontScaler*); |
| 135 inline void detachStrikeFromList(GrTextStrike*); | 135 inline void detachStrikeFromList(GrTextStrike*); |
| 136 void purgeStrike(GrTextStrike* strike); | 136 void purgeStrike(GrTextStrike* strike); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 #endif | 139 #endif |
| OLD | NEW |