| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 // We can reuse distance field text, but only if the new viewmatrix woul
d not result in | 242 // We can reuse distance field text, but only if the new viewmatrix woul
d not result in |
| 243 // a mip change. Because there can be multiple runs in a blob, we track
the overall | 243 // a mip change. Because there can be multiple runs in a blob, we track
the overall |
| 244 // maximum minimum scale, and minimum maximum scale, we can support befo
re we need to regen | 244 // maximum minimum scale, and minimum maximum scale, we can support befo
re we need to regen |
| 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 static const Key& GetKey(const BitmapTextBlob& blob) { | 255 static const Key& GetKey(const BitmapTextBlob& blob) { |
| 256 return blob.fKey; | 256 return blob.fKey; |
| 257 } | 257 } |
| 258 | 258 |
| 259 static uint32_t Hash(const Key& key) { | 259 static uint32_t Hash(const Key& key) { |
| 260 return SkChecksum::Murmur3(&key, sizeof(Key)); | 260 return SkChecksum::Murmur3(&key, sizeof(Key)); |
| 261 } | 261 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 bool fEnableDFRendering; | 394 bool fEnableDFRendering; |
| 395 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; | 395 SkAutoTUnref<DistanceAdjustTable> fDistanceAdjustTable; |
| 396 | 396 |
| 397 friend class GrTextBlobCache; | 397 friend class GrTextBlobCache; |
| 398 friend class BitmapTextBatch; | 398 friend class BitmapTextBatch; |
| 399 | 399 |
| 400 typedef GrTextContext INHERITED; | 400 typedef GrTextContext INHERITED; |
| 401 }; | 401 }; |
| 402 | 402 |
| 403 #endif | 403 #endif |
| OLD | NEW |