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 GrAtlasTextBlob_DEFINED | 8 #ifndef GrAtlasTextBlob_DEFINED |
9 #define GrAtlasTextBlob_DEFINED | 9 #define GrAtlasTextBlob_DEFINED |
10 | 10 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 switch (maskFormat) { | 293 switch (maskFormat) { |
294 case kA8_GrMaskFormat: | 294 case kA8_GrMaskFormat: |
295 return kGrayTextVASize; | 295 return kGrayTextVASize; |
296 case kARGB_GrMaskFormat: | 296 case kARGB_GrMaskFormat: |
297 return kColorTextVASize; | 297 return kColorTextVASize; |
298 default: | 298 default: |
299 return kLCDTextVASize; | 299 return kLCDTextVASize; |
300 } | 300 } |
301 } | 301 } |
302 | 302 |
| 303 bool mustRegenerate(SkScalar* outTransX, SkScalar* outTransY, const SkPaint&
paint, |
| 304 GrColor color, const SkMaskFilter::BlurRec& blurRec, |
| 305 const SkMatrix& viewMatrix, SkScalar x, SkScalar y); |
| 306 |
303 // position + local coord | 307 // position + local coord |
304 static const size_t kColorTextVASize = sizeof(SkPoint) + sizeof(SkIPoint16); | 308 static const size_t kColorTextVASize = sizeof(SkPoint) + sizeof(SkIPoint16); |
305 static const size_t kGrayTextVASize = sizeof(SkPoint) + sizeof(GrColor) + si
zeof(SkIPoint16); | 309 static const size_t kGrayTextVASize = sizeof(SkPoint) + sizeof(GrColor) + si
zeof(SkIPoint16); |
306 static const size_t kLCDTextVASize = kGrayTextVASize; | 310 static const size_t kLCDTextVASize = kGrayTextVASize; |
307 static const int kVerticesPerGlyph = 4; | 311 static const int kVerticesPerGlyph = 4; |
308 | 312 |
309 #ifdef CACHE_SANITY_CHECK | 313 #ifdef CACHE_SANITY_CHECK |
310 static void AssertEqual(const GrAtlasTextBlob&, const GrAtlasTextBlob&); | 314 static void AssertEqual(const GrAtlasTextBlob&, const GrAtlasTextBlob&); |
311 size_t fSize; | 315 size_t fSize; |
312 #endif | 316 #endif |
313 }; | 317 }; |
314 | 318 |
315 #endif | 319 #endif |
OLD | NEW |