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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1039 | 1039 |
1040 SK_TO_STRING_NONVIRT() | 1040 SK_TO_STRING_NONVIRT() |
1041 | 1041 |
1042 struct FlatteningTraits { | 1042 struct FlatteningTraits { |
1043 static void Flatten(SkWriteBuffer& buffer, const SkPaint& paint); | 1043 static void Flatten(SkWriteBuffer& buffer, const SkPaint& paint); |
1044 static void Unflatten(SkReadBuffer& buffer, SkPaint* paint); | 1044 static void Unflatten(SkReadBuffer& buffer, SkPaint* paint); |
1045 }; | 1045 }; |
1046 | 1046 |
1047 private: | 1047 private: |
1048 SkTypeface* fTypeface; | 1048 SkTypeface* fTypeface; |
1049 SkScalar fTextSize; | |
1050 SkScalar fTextScaleX; | |
1051 SkScalar fTextSkewX; | |
1052 | |
1053 SkPathEffect* fPathEffect; | 1049 SkPathEffect* fPathEffect; |
1054 SkShader* fShader; | 1050 SkShader* fShader; |
1055 SkXfermode* fXfermode; | 1051 SkXfermode* fXfermode; |
1056 SkMaskFilter* fMaskFilter; | 1052 SkMaskFilter* fMaskFilter; |
1057 SkColorFilter* fColorFilter; | 1053 SkColorFilter* fColorFilter; |
1058 SkRasterizer* fRasterizer; | 1054 SkRasterizer* fRasterizer; |
1059 SkDrawLooper* fLooper; | 1055 SkDrawLooper* fLooper; |
1060 SkImageFilter* fImageFilter; | 1056 SkImageFilter* fImageFilter; |
1061 SkAnnotation* fAnnotation; | 1057 SkAnnotation* fAnnotation; |
1062 | 1058 |
| 1059 SkScalar fTextSize; |
| 1060 SkScalar fTextScaleX; |
| 1061 SkScalar fTextSkewX; |
1063 SkColor fColor; | 1062 SkColor fColor; |
1064 SkScalar fWidth; | 1063 SkScalar fWidth; |
1065 SkScalar fMiterLimit; | 1064 SkScalar fMiterLimit; |
1066 | |
1067 union { | 1065 union { |
1068 struct { | 1066 struct { |
1069 // all of these bitfields should add up to 32 | 1067 // all of these bitfields should add up to 32 |
1070 unsigned fFlags : 16; | 1068 unsigned fFlags : 16; |
1071 unsigned fTextAlign : 2; | 1069 unsigned fTextAlign : 2; |
1072 unsigned fCapType : 2; | 1070 unsigned fCapType : 2; |
1073 unsigned fJoinType : 2; | 1071 unsigned fJoinType : 2; |
1074 unsigned fStyle : 2; | 1072 unsigned fStyle : 2; |
1075 unsigned fTextEncoding : 2; // 3 values | 1073 unsigned fTextEncoding : 2; // 3 values |
1076 unsigned fHinting : 2; | 1074 unsigned fHinting : 2; |
1077 //unsigned fFreeBits : 4; | 1075 //unsigned fFreeBits : 4; |
1078 }; | 1076 }; |
1079 uint32_t fBitfields; | 1077 uint32_t fBitfields; |
1080 }; | 1078 }; |
| 1079 uint32_t fDirtyBits; |
| 1080 |
1081 uint32_t getBitfields() const { return fBitfields; } | 1081 uint32_t getBitfields() const { return fBitfields; } |
1082 void setBitfields(uint32_t bitfields); | 1082 void setBitfields(uint32_t bitfields); |
1083 | 1083 |
1084 uint32_t fDirtyBits; | |
1085 | |
1086 SkDrawCacheProc getDrawCacheProc() const; | 1084 SkDrawCacheProc getDrawCacheProc() const; |
1087 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, | 1085 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, |
1088 bool needFullMetrics) const; | 1086 bool needFullMetrics) const; |
1089 | 1087 |
1090 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, | 1088 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, |
1091 int* count, SkRect* bounds) const; | 1089 int* count, SkRect* bounds) const; |
1092 | 1090 |
1093 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const
SkMatrix*) const; | 1091 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const
SkMatrix*) const; |
1094 | 1092 |
1095 void descriptorProc(const SkDeviceProperties* deviceProperties, const SkMatr
ix* deviceMatrix, | 1093 void descriptorProc(const SkDeviceProperties* deviceProperties, const SkMatr
ix* deviceMatrix, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 #ifdef SK_BUILD_FOR_ANDROID | 1150 #ifdef SK_BUILD_FOR_ANDROID |
1153 SkPaintOptionsAndroid fPaintOptionsAndroid; | 1151 SkPaintOptionsAndroid fPaintOptionsAndroid; |
1154 | 1152 |
1155 // In order for the == operator to work properly this must be the last field | 1153 // In order for the == operator to work properly this must be the last field |
1156 // in the struct so that we can do a memcmp to this field's offset. | 1154 // in the struct so that we can do a memcmp to this field's offset. |
1157 uint32_t fGenerationID; | 1155 uint32_t fGenerationID; |
1158 #endif | 1156 #endif |
1159 }; | 1157 }; |
1160 | 1158 |
1161 #endif | 1159 #endif |
OLD | NEW |