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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 //unsigned fFreeBits : 2; | 1078 //unsigned fFreeBits : 2; |
1079 } fBitfields; | 1079 } fBitfields; |
1080 uint32_t fBitfieldsUInt; | 1080 uint32_t fBitfieldsUInt; |
1081 }; | 1081 }; |
1082 | 1082 |
1083 GlyphCacheProc getGlyphCacheProc(bool needFullMetrics) const; | 1083 GlyphCacheProc getGlyphCacheProc(bool needFullMetrics) const; |
1084 | 1084 |
1085 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, | 1085 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, |
1086 int* count, SkRect* bounds) const; | 1086 int* count, SkRect* bounds) const; |
1087 | 1087 |
1088 enum class FakeGamma { | 1088 enum ScalerContextFlags : uint32_t { |
1089 Off = 0, On | 1089 kNone_ScalerContextFlags = 0, |
| 1090 |
| 1091 kFakeGamma_ScalerContextFlag = 1 << 0, |
| 1092 kBoostContrast_ScalerContextFlag = 1 << 1, |
| 1093 |
| 1094 kFakeGammaAndBoostContrast_ScalerContextFlags = |
| 1095 kFakeGamma_ScalerContextFlag | kBoostContrast_ScalerContextFlag, |
1090 }; | 1096 }; |
1091 | 1097 |
1092 /* | 1098 /* |
1093 * Allocs an SkDescriptor on the heap and return it to the caller as a refcn
ted | 1099 * Allocs an SkDescriptor on the heap and return it to the caller as a refcn
ted |
1094 * SkData. Caller is responsible for managing the lifetime of this object. | 1100 * SkData. Caller is responsible for managing the lifetime of this object. |
1095 */ | 1101 */ |
1096 void getScalerContextDescriptor(SkAutoDescriptor*, const SkSurfaceProps& sur
faceProps, | 1102 void getScalerContextDescriptor(SkAutoDescriptor*, const SkSurfaceProps& sur
faceProps, |
1097 FakeGamma fakeGamma, const SkMatrix*) const; | 1103 uint32_t scalerContextFlags, const SkMatrix*
) const; |
1098 | 1104 |
1099 SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, FakeGamma fake
Gamma, | 1105 SkGlyphCache* detachCache(const SkSurfaceProps* surfaceProps, uint32_t scale
rContextFlags, |
1100 const SkMatrix*) const; | 1106 const SkMatrix*) const; |
1101 | 1107 |
1102 void descriptorProc(const SkSurfaceProps* surfaceProps, FakeGamma fakeGamma, | 1108 void descriptorProc(const SkSurfaceProps* surfaceProps, uint32_t scalerConte
xtFlags, |
1103 const SkMatrix* deviceMatrix, | 1109 const SkMatrix* deviceMatrix, |
1104 void (*proc)(SkTypeface*, const SkDescriptor*, void*), | 1110 void (*proc)(SkTypeface*, const SkDescriptor*, void*), |
1105 void* context) const; | 1111 void* context) const; |
1106 | 1112 |
1107 /* | 1113 /* |
1108 * The luminance color is used to determine which Gamma Canonical color to m
ap to. This is | 1114 * The luminance color is used to determine which Gamma Canonical color to m
ap to. This is |
1109 * really only used by backends which want to cache glyph masks, and need so
me way to know if | 1115 * really only used by backends which want to cache glyph masks, and need so
me way to know if |
1110 * they need to generate new masks based off a given color. | 1116 * they need to generate new masks based off a given color. |
1111 */ | 1117 */ |
1112 SkColor computeLuminanceColor() const; | 1118 SkColor computeLuminanceColor() const; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1159 friend class GrStencilAndCoverTextContext; | 1165 friend class GrStencilAndCoverTextContext; |
1160 friend class GrPathRendering; | 1166 friend class GrPathRendering; |
1161 friend class GrTextUtils; | 1167 friend class GrTextUtils; |
1162 friend class GrGLPathRendering; | 1168 friend class GrGLPathRendering; |
1163 friend class SkScalerContext; | 1169 friend class SkScalerContext; |
1164 friend class SkTextBaseIter; | 1170 friend class SkTextBaseIter; |
1165 friend class SkCanonicalizePaint; | 1171 friend class SkCanonicalizePaint; |
1166 }; | 1172 }; |
1167 | 1173 |
1168 #endif | 1174 #endif |
OLD | NEW |