| 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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 uint32_t getBitfields() const { return fBitfields; } | 1074 uint32_t getBitfields() const { return fBitfields; } |
| 1075 void setBitfields(uint32_t bitfields); | 1075 void setBitfields(uint32_t bitfields); |
| 1076 | 1076 |
| 1077 SkDrawCacheProc getDrawCacheProc() const; | 1077 SkDrawCacheProc getDrawCacheProc() const; |
| 1078 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, | 1078 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, |
| 1079 bool needFullMetrics) const; | 1079 bool needFullMetrics) const; |
| 1080 | 1080 |
| 1081 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, | 1081 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, |
| 1082 int* count, SkRect* bounds) const; | 1082 int* count, SkRect* bounds) const; |
| 1083 | 1083 |
| 1084 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const
SkMatrix*) const; | 1084 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const
SkMatrix*, |
| 1085 bool ignoreGamma) const; |
| 1085 | 1086 |
| 1086 void descriptorProc(const SkDeviceProperties* deviceProperties, const SkMatr
ix* deviceMatrix, | 1087 void descriptorProc(const SkDeviceProperties* deviceProperties, const SkMatr
ix* deviceMatrix, |
| 1087 void (*proc)(SkTypeface*, const SkDescriptor*, void*), | 1088 void (*proc)(SkTypeface*, const SkDescriptor*, void*), |
| 1088 void* context, bool ignoreGamma = false) const; | 1089 void* context, bool ignoreGamma = false) const; |
| 1089 | 1090 |
| 1090 static void Term(); | 1091 static void Term(); |
| 1091 | 1092 |
| 1092 enum { | 1093 enum { |
| 1093 /* This is the size we use when we ask for a glyph's path. We then | 1094 /* This is the size we use when we ask for a glyph's path. We then |
| 1094 * post-transform it as we draw to match the request. | 1095 * post-transform it as we draw to match the request. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1124 // have change it to kCanonicalTextSizeForPaths. | 1125 // have change it to kCanonicalTextSizeForPaths. |
| 1125 SkScalar setupForAsPaths(); | 1126 SkScalar setupForAsPaths(); |
| 1126 | 1127 |
| 1127 static SkScalar MaxCacheSize2() { | 1128 static SkScalar MaxCacheSize2() { |
| 1128 static const SkScalar kMaxSize = SkIntToScalar(kMaxSizeForGlyphCache); | 1129 static const SkScalar kMaxSize = SkIntToScalar(kMaxSizeForGlyphCache); |
| 1129 static const SkScalar kMag2Max = kMaxSize * kMaxSize; | 1130 static const SkScalar kMag2Max = kMaxSize * kMaxSize; |
| 1130 return kMag2Max; | 1131 return kMag2Max; |
| 1131 } | 1132 } |
| 1132 | 1133 |
| 1133 friend class SkAutoGlyphCache; | 1134 friend class SkAutoGlyphCache; |
| 1135 friend class SkAutoGlyphCacheNoGamma; |
| 1134 friend class SkCanvas; | 1136 friend class SkCanvas; |
| 1135 friend class SkDraw; | 1137 friend class SkDraw; |
| 1136 friend class SkGraphics; // So Term() can be called. | 1138 friend class SkGraphics; // So Term() can be called. |
| 1137 friend class SkPDFDevice; | 1139 friend class SkPDFDevice; |
| 1138 friend class GrBitmapTextContext; | 1140 friend class GrBitmapTextContext; |
| 1139 friend class GrDistanceFieldTextContext; | 1141 friend class GrDistanceFieldTextContext; |
| 1140 friend class SkTextToPathIter; | 1142 friend class SkTextToPathIter; |
| 1141 friend class SkCanonicalizePaint; | 1143 friend class SkCanonicalizePaint; |
| 1142 | 1144 |
| 1143 #ifdef SK_BUILD_FOR_ANDROID | 1145 #ifdef SK_BUILD_FOR_ANDROID |
| 1144 SkPaintOptionsAndroid fPaintOptionsAndroid; | 1146 SkPaintOptionsAndroid fPaintOptionsAndroid; |
| 1145 | 1147 |
| 1146 // In order for the == operator to work properly this must be the last field | 1148 // In order for the == operator to work properly this must be the last field |
| 1147 // in the struct so that we can do a memcmp to this field's offset. | 1149 // in the struct so that we can do a memcmp to this field's offset. |
| 1148 uint32_t fGenerationID; | 1150 uint32_t fGenerationID; |
| 1149 #endif | 1151 #endif |
| 1150 }; | 1152 }; |
| 1151 | 1153 |
| 1152 #endif | 1154 #endif |
| OLD | NEW |