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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 } | 178 } |
179 } | 179 } |
180 void forget() { | 180 void forget() { |
181 fCache = NULL; | 181 fCache = NULL; |
182 } | 182 } |
183 private: | 183 private: |
184 const SkGlyphCache* fCache; | 184 const SkGlyphCache* fCache; |
185 }; | 185 }; |
186 | 186 |
187 private: | 187 private: |
188 SkGlyphCache(SkTypeface*, const SkDescriptor*); | 188 // we take ownership of the scalercontext |
| 189 SkGlyphCache(SkTypeface*, const SkDescriptor*, SkScalerContext*); |
189 ~SkGlyphCache(); | 190 ~SkGlyphCache(); |
190 | 191 |
191 enum MetricsType { | 192 enum MetricsType { |
192 kJustAdvance_MetricsType, | 193 kJustAdvance_MetricsType, |
193 kFull_MetricsType | 194 kFull_MetricsType |
194 }; | 195 }; |
195 | 196 |
196 SkGlyph* lookupMetrics(uint32_t id, MetricsType); | 197 SkGlyph* lookupMetrics(uint32_t id, MetricsType); |
197 static bool DetachProc(const SkGlyphCache*, void*) { return true; } | 198 static bool DetachProc(const SkGlyphCache*, void*) { return true; } |
198 | 199 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 } | 292 } |
292 } | 293 } |
293 | 294 |
294 private: | 295 private: |
295 SkGlyphCache* fCache; | 296 SkGlyphCache* fCache; |
296 | 297 |
297 static bool DetachProc(const SkGlyphCache*, void*); | 298 static bool DetachProc(const SkGlyphCache*, void*); |
298 }; | 299 }; |
299 | 300 |
300 #endif | 301 #endif |
OLD | NEW |