| OLD | NEW |
| 1 | 1 |
| 2 | 2 |
| 3 /* | 3 /* |
| 4 * Copyright 2006 The Android Open Source Project | 4 * Copyright 2006 The Android Open Source Project |
| 5 * | 5 * |
| 6 * Use of this source code is governed by a BSD-style license that can be | 6 * Use of this source code is governed by a BSD-style license that can be |
| 7 * found in the LICENSE file. | 7 * found in the LICENSE file. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 | 10 |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 /* | 1110 /* |
| 1111 * Above this size (taking into account CTM and textSize), we never use | 1111 * Above this size (taking into account CTM and textSize), we never use |
| 1112 * the cache for bits or metrics (we might overflow), so we just ask | 1112 * the cache for bits or metrics (we might overflow), so we just ask |
| 1113 * for a caononical size and post-transform that. | 1113 * for a caononical size and post-transform that. |
| 1114 */ | 1114 */ |
| 1115 kMaxSizeForGlyphCache = 256, | 1115 kMaxSizeForGlyphCache = 256, |
| 1116 }; | 1116 }; |
| 1117 | 1117 |
| 1118 static bool TooBigToUseCache(const SkMatrix& ctm, const SkMatrix& textM); | 1118 static bool TooBigToUseCache(const SkMatrix& ctm, const SkMatrix& textM); |
| 1119 | 1119 |
| 1120 bool tooBigToUseCache() const; | |
| 1121 bool tooBigToUseCache(const SkMatrix& ctm) const; | |
| 1122 | |
| 1123 // Set flags/hinting/textSize up to use for drawing text as paths. | 1120 // Set flags/hinting/textSize up to use for drawing text as paths. |
| 1124 // Returns scale factor to restore the original textSize, since will will | 1121 // Returns scale factor to restore the original textSize, since will will |
| 1125 // have change it to kCanonicalTextSizeForPaths. | 1122 // have change it to kCanonicalTextSizeForPaths. |
| 1126 SkScalar setupForAsPaths(); | 1123 SkScalar setupForAsPaths(); |
| 1127 | 1124 |
| 1128 static SkScalar MaxCacheSize2() { | 1125 static SkScalar MaxCacheSize2() { |
| 1129 static const SkScalar kMaxSize = SkIntToScalar(kMaxSizeForGlyphCache); | 1126 static const SkScalar kMaxSize = SkIntToScalar(kMaxSizeForGlyphCache); |
| 1130 static const SkScalar kMag2Max = kMaxSize * kMaxSize; | 1127 static const SkScalar kMag2Max = kMaxSize * kMaxSize; |
| 1131 return kMag2Max; | 1128 return kMag2Max; |
| 1132 } | 1129 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1145 #ifdef SK_BUILD_FOR_ANDROID | 1142 #ifdef SK_BUILD_FOR_ANDROID |
| 1146 SkPaintOptionsAndroid fPaintOptionsAndroid; | 1143 SkPaintOptionsAndroid fPaintOptionsAndroid; |
| 1147 | 1144 |
| 1148 // In order for the == operator to work properly this must be the last field | 1145 // In order for the == operator to work properly this must be the last field |
| 1149 // in the struct so that we can do a memcmp to this field's offset. | 1146 // in the struct so that we can do a memcmp to this field's offset. |
| 1150 uint32_t fGenerationID; | 1147 uint32_t fGenerationID; |
| 1151 #endif | 1148 #endif |
| 1152 }; | 1149 }; |
| 1153 | 1150 |
| 1154 #endif | 1151 #endif |
| OLD | NEW |