| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 #ifndef SkGlyphCache_DEFINED | 10 #ifndef SkGlyphCache_DEFINED |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 struct SkDeviceProperties; | 21 struct SkDeviceProperties; |
| 22 class SkPaint; | 22 class SkPaint; |
| 23 | 23 |
| 24 class SkGlyphCache_Globals; | 24 class SkGlyphCache_Globals; |
| 25 | 25 |
| 26 /** \class SkGlyphCache | 26 /** \class SkGlyphCache |
| 27 | 27 |
| 28 This class represents a strike: a specific combination of typeface, size, | 28 This class represents a strike: a specific combination of typeface, size, |
| 29 matrix, etc., and holds the glyphs for that strike. Calling any of the | 29 matrix, etc., and holds the glyphs for that strike. Calling any of the |
| 30 getUnichar.../getGlyphID... methods will return the requested glyph, | 30 getUnichar.../getGlyphID... methods will return the requested glyph, |
| 31 either instantly if it is already cahced, or by first generating it and then | 31 either instantly if it is already cached, or by first generating it and then |
| 32 adding it to the strike. | 32 adding it to the strike. |
| 33 | 33 |
| 34 The strikes are held in a global list, available to all threads. To interact | 34 The strikes are held in a global list, available to all threads. To interact |
| 35 with one, call either VisitCache() or DetachCache(). | 35 with one, call either VisitCache() or DetachCache(). |
| 36 */ | 36 */ |
| 37 class SkGlyphCache { | 37 class SkGlyphCache { |
| 38 public: | 38 public: |
| 39 /** Returns a glyph with valid fAdvance and fDevKern fields. | 39 /** Returns a glyph with valid fAdvance and fDevKern fields. |
| 40 The remaining fields may be valid, but that is not guaranteed. If you | 40 The remaining fields may be valid, but that is not guaranteed. If you |
| 41 require those, call getUnicharMetrics or getGlyphIDMetrics instead. | 41 require those, call getUnicharMetrics or getGlyphIDMetrics instead. |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 } | 267 } |
| 268 | 268 |
| 269 private: | 269 private: |
| 270 SkGlyphCache* fCache; | 270 SkGlyphCache* fCache; |
| 271 | 271 |
| 272 static bool DetachProc(const SkGlyphCache*, void*); | 272 static bool DetachProc(const SkGlyphCache*, void*); |
| 273 }; | 273 }; |
| 274 #define SkAutoGlyphCache(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCache) | 274 #define SkAutoGlyphCache(...) SK_REQUIRE_LOCAL_VAR(SkAutoGlyphCache) |
| 275 | 275 |
| 276 #endif | 276 #endif |
| OLD | NEW |