OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrAtlasTextContext_DEFINED | 8 #ifndef GrAtlasTextContext_DEFINED |
9 #define GrAtlasTextContext_DEFINED | 9 #define GrAtlasTextContext_DEFINED |
10 | 10 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 SkScalar fMaxMinScale; | 245 SkScalar fMaxMinScale; |
246 SkScalar fMinMaxScale; | 246 SkScalar fMinMaxScale; |
247 int fRunCount; | 247 int fRunCount; |
248 uint8_t fTextType; | 248 uint8_t fTextType; |
249 | 249 |
250 BitmapTextBlob() | 250 BitmapTextBlob() |
251 : fMaxMinScale(-SK_ScalarMax) | 251 : fMaxMinScale(-SK_ScalarMax) |
252 , fMinMaxScale(SK_ScalarMax) | 252 , fMinMaxScale(SK_ScalarMax) |
253 , fTextType(0) {} | 253 , fTextType(0) {} |
254 | 254 |
| 255 ~BitmapTextBlob() override { |
| 256 for (int i = 0; i < fRunCount; i++) { |
| 257 fRuns[i].~Run(); |
| 258 } |
| 259 } |
| 260 |
255 static const Key& GetKey(const BitmapTextBlob& blob) { | 261 static const Key& GetKey(const BitmapTextBlob& blob) { |
256 return blob.fKey; | 262 return blob.fKey; |
257 } | 263 } |
258 | 264 |
259 static uint32_t Hash(const Key& key) { | 265 static uint32_t Hash(const Key& key) { |
260 return SkChecksum::Murmur3(&key, sizeof(Key)); | 266 return SkChecksum::Murmur3(&key, sizeof(Key)); |
261 } | 267 } |
262 | 268 |
263 void operator delete(void* p) { | 269 void operator delete(void* p) { |
264 BitmapTextBlob* blob = reinterpret_cast<BitmapTextBlob*>(p); | 270 BitmapTextBlob* blob = reinterpret_cast<BitmapTextBlob*>(p); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 bool fEnableDFRendering; | 400 bool fEnableDFRendering; |
395 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; | 401 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; |
396 | 402 |
397 friend class GrTextBlobCache; | 403 friend class GrTextBlobCache; |
398 friend class BitmapTextBatch; | 404 friend class BitmapTextBatch; |
399 | 405 |
400 typedef GrTextContext INHERITED; | 406 typedef GrTextContext INHERITED; |
401 }; | 407 }; |
402 | 408 |
403 #endif | 409 #endif |
OLD | NEW |