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