OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPaint_DEFINED | 8 #ifndef SkPaint_DEFINED |
9 #define SkPaint_DEFINED | 9 #define SkPaint_DEFINED |
10 | 10 |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 } fBitfields; | 1065 } fBitfields; |
1066 uint32_t fBitfieldsUInt; | 1066 uint32_t fBitfieldsUInt; |
1067 }; | 1067 }; |
1068 | 1068 |
1069 SkDrawCacheProc getDrawCacheProc() const; | 1069 SkDrawCacheProc getDrawCacheProc() const; |
1070 SkMeasureCacheProc getMeasureCacheProc(bool needFullMetrics) const; | 1070 SkMeasureCacheProc getMeasureCacheProc(bool needFullMetrics) const; |
1071 | 1071 |
1072 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, | 1072 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, |
1073 int* count, SkRect* bounds) const; | 1073 int* count, SkRect* bounds) const; |
1074 | 1074 |
| 1075 enum class FakeGamma { |
| 1076 Off = 0, On |
| 1077 }; |
| 1078 |
1075 /* | 1079 /* |
1076 * Allocs an SkDescriptor on the heap and return it to the caller as a refcn
ted | 1080 * Allocs an SkDescriptor on the heap and return it to the caller as a refcn
ted |
1077 * SkData. Caller is responsible for managing the lifetime of this object. | 1081 * SkData. Caller is responsible for managing the lifetime of this object. |
1078 */ | 1082 */ |
1079 void getScalerContextDescriptor(SkAutoDescriptor*, const SkSurfaceProps& sur
faceProps, | 1083 void getScalerContextDescriptor(SkAutoDescriptor*, const SkSurfaceProps& sur
faceProps, |
1080 const SkMatrix*, bool ignoreGamma) const; | 1084 FakeGamma fakeGamma, const SkMatrix*) const; |
1081 | 1085 |
1082 SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, const SkMatrix
*, | 1086 SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, FakeGamma fake
Gamma, |
1083 bool ignoreGamma) const; | 1087 const SkMatrix*) const; |
1084 | 1088 |
1085 void descriptorProc(const SkSurfaceProps* surfaceProps, const SkMatrix* devi
ceMatrix, | 1089 void descriptorProc(const SkSurfaceProps* surfaceProps, FakeGamma fakeGamma, |
| 1090 const SkMatrix* deviceMatrix, |
1086 void (*proc)(SkTypeface*, const SkDescriptor*, void*), | 1091 void (*proc)(SkTypeface*, const SkDescriptor*, void*), |
1087 void* context, bool ignoreGamma) const; | 1092 void* context) const; |
1088 | 1093 |
1089 /* | 1094 /* |
1090 * The luminance color is used to determine which Gamma Canonical color to m
ap to. This is | 1095 * The luminance color is used to determine which Gamma Canonical color to m
ap to. This is |
1091 * really only used by backends which want to cache glyph masks, and need so
me way to know if | 1096 * really only used by backends which want to cache glyph masks, and need so
me way to know if |
1092 * they need to generate new masks based off a given color. | 1097 * they need to generate new masks based off a given color. |
1093 */ | 1098 */ |
1094 SkColor computeLuminanceColor() const; | 1099 SkColor computeLuminanceColor() const; |
1095 | 1100 |
1096 enum { | 1101 enum { |
1097 /* This is the size we use when we ask for a glyph's path. We then | 1102 /* This is the size we use when we ask for a glyph's path. We then |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1141 friend class GrStencilAndCoverTextContext; | 1146 friend class GrStencilAndCoverTextContext; |
1142 friend class GrPathRendering; | 1147 friend class GrPathRendering; |
1143 friend class GrTextUtils; | 1148 friend class GrTextUtils; |
1144 friend class GrGLPathRendering; | 1149 friend class GrGLPathRendering; |
1145 friend class SkScalerContext; | 1150 friend class SkScalerContext; |
1146 friend class SkTextBaseIter; | 1151 friend class SkTextBaseIter; |
1147 friend class SkCanonicalizePaint; | 1152 friend class SkCanonicalizePaint; |
1148 }; | 1153 }; |
1149 | 1154 |
1150 #endif | 1155 #endif |
OLD | NEW |