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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 } | 1017 } |
1018 return matrix; | 1018 return matrix; |
1019 } | 1019 } |
1020 | 1020 |
1021 SkMatrix* setTextMatrix(SkMatrix* matrix) const { | 1021 SkMatrix* setTextMatrix(SkMatrix* matrix) const { |
1022 return SetTextMatrix(matrix, fTextSize, fTextScaleX, fTextSkewX); | 1022 return SetTextMatrix(matrix, fTextSize, fTextScaleX, fTextSkewX); |
1023 } | 1023 } |
1024 | 1024 |
1025 SK_TO_STRING_NONVIRT() | 1025 SK_TO_STRING_NONVIRT() |
1026 | 1026 |
1027 struct FlatteningTraits { | |
1028 static void Flatten(SkWriteBuffer& buffer, const SkPaint& paint); | |
1029 static void Unflatten(SkReadBuffer& buffer, SkPaint* paint); | |
1030 }; | |
1031 | |
1032 private: | 1027 private: |
1033 SkTypeface* fTypeface; | 1028 SkTypeface* fTypeface; |
1034 SkPathEffect* fPathEffect; | 1029 SkPathEffect* fPathEffect; |
1035 SkShader* fShader; | 1030 SkShader* fShader; |
1036 SkXfermode* fXfermode; | 1031 SkXfermode* fXfermode; |
1037 SkMaskFilter* fMaskFilter; | 1032 SkMaskFilter* fMaskFilter; |
1038 SkColorFilter* fColorFilter; | 1033 SkColorFilter* fColorFilter; |
1039 SkRasterizer* fRasterizer; | 1034 SkRasterizer* fRasterizer; |
1040 SkDrawLooper* fLooper; | 1035 SkDrawLooper* fLooper; |
1041 SkImageFilter* fImageFilter; | 1036 SkImageFilter* fImageFilter; |
(...skipping 13 matching lines...) Expand all Loading... |
1055 unsigned fCapType : 2; | 1050 unsigned fCapType : 2; |
1056 unsigned fJoinType : 2; | 1051 unsigned fJoinType : 2; |
1057 unsigned fStyle : 2; | 1052 unsigned fStyle : 2; |
1058 unsigned fTextEncoding : 2; // 3 values | 1053 unsigned fTextEncoding : 2; // 3 values |
1059 unsigned fHinting : 2; | 1054 unsigned fHinting : 2; |
1060 unsigned fFilterLevel : 2; | 1055 unsigned fFilterLevel : 2; |
1061 //unsigned fFreeBits : 2; | 1056 //unsigned fFreeBits : 2; |
1062 } fBitfields; | 1057 } fBitfields; |
1063 uint32_t fBitfieldsUInt; | 1058 uint32_t fBitfieldsUInt; |
1064 }; | 1059 }; |
1065 uint32_t fDirtyBits; | |
1066 | 1060 |
1067 SkDrawCacheProc getDrawCacheProc() const; | 1061 SkDrawCacheProc getDrawCacheProc() const; |
1068 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, | 1062 SkMeasureCacheProc getMeasureCacheProc(TextBufferDirection dir, |
1069 bool needFullMetrics) const; | 1063 bool needFullMetrics) const; |
1070 | 1064 |
1071 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, | 1065 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, |
1072 int* count, SkRect* bounds) const; | 1066 int* count, SkRect* bounds) const; |
1073 | 1067 |
1074 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const
SkMatrix*, | 1068 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const
SkMatrix*, |
1075 bool ignoreGamma) const; | 1069 bool ignoreGamma) const; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 friend class SkCanonicalizePaint; | 1127 friend class SkCanonicalizePaint; |
1134 | 1128 |
1135 #ifdef SK_BUILD_FOR_ANDROID | 1129 #ifdef SK_BUILD_FOR_ANDROID |
1136 // In order for the == operator to work properly this must be the last field | 1130 // In order for the == operator to work properly this must be the last field |
1137 // in the struct so that we can do a memcmp to this field's offset. | 1131 // in the struct so that we can do a memcmp to this field's offset. |
1138 uint32_t fGenerationID; | 1132 uint32_t fGenerationID; |
1139 #endif | 1133 #endif |
1140 }; | 1134 }; |
1141 | 1135 |
1142 #endif | 1136 #endif |
OLD | NEW |