| 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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1069 void getScalerContextDescriptor(SkAutoDescriptor*, const SkDeviceProperties*
deviceProperties, | 1069 void getScalerContextDescriptor(SkAutoDescriptor*, const SkDeviceProperties*
deviceProperties, |
| 1070 const SkMatrix*, bool ignoreGamma) const; | 1070 const SkMatrix*, bool ignoreGamma) const; |
| 1071 | 1071 |
| 1072 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const
SkMatrix*, | 1072 SkGlyphCache* detachCache(const SkDeviceProperties* deviceProperties, const
SkMatrix*, |
| 1073 bool ignoreGamma) const; | 1073 bool ignoreGamma) const; |
| 1074 | 1074 |
| 1075 void descriptorProc(const SkDeviceProperties* deviceProperties, const SkMatr
ix* deviceMatrix, | 1075 void descriptorProc(const SkDeviceProperties* deviceProperties, const SkMatr
ix* deviceMatrix, |
| 1076 void (*proc)(SkTypeface*, const SkDescriptor*, void*), | 1076 void (*proc)(SkTypeface*, const SkDescriptor*, void*), |
| 1077 void* context, bool ignoreGamma = false) const; | 1077 void* context, bool ignoreGamma = false) const; |
| 1078 | 1078 |
| 1079 /* |
| 1080 * The luminance color is used to determine which Gamma Canonical color to m
ap to. This is |
| 1081 * really only used by backends which want to cache glyph masks, and need so
me way to know if |
| 1082 * they need to generate new masks based off a given color. |
| 1083 */ |
| 1084 SkColor computeLuminanceColor() const; |
| 1085 |
| 1079 static void Term(); | 1086 static void Term(); |
| 1080 | 1087 |
| 1081 enum { | 1088 enum { |
| 1082 /* This is the size we use when we ask for a glyph's path. We then | 1089 /* This is the size we use when we ask for a glyph's path. We then |
| 1083 * post-transform it as we draw to match the request. | 1090 * post-transform it as we draw to match the request. |
| 1084 * This is done to try to re-use cache entries for the path. | 1091 * This is done to try to re-use cache entries for the path. |
| 1085 * | 1092 * |
| 1086 * This value is somewhat arbitrary. In theory, it could be 1, since | 1093 * This value is somewhat arbitrary. In theory, it could be 1, since |
| 1087 * we store paths as floats. However, we get the path from the font | 1094 * we store paths as floats. However, we get the path from the font |
| 1088 * scaler, and it may represent its paths as fixed-point (or 26.6), | 1095 * scaler, and it may represent its paths as fixed-point (or 26.6), |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 friend class SkDraw; | 1129 friend class SkDraw; |
| 1123 friend class SkGraphics; // So Term() can be called. | 1130 friend class SkGraphics; // So Term() can be called. |
| 1124 friend class SkPDFDevice; | 1131 friend class SkPDFDevice; |
| 1125 friend class GrBitmapTextContext; | 1132 friend class GrBitmapTextContext; |
| 1126 friend class GrAtlasTextContext; | 1133 friend class GrAtlasTextContext; |
| 1127 friend class GrDistanceFieldTextContext; | 1134 friend class GrDistanceFieldTextContext; |
| 1128 friend class GrStencilAndCoverTextContext; | 1135 friend class GrStencilAndCoverTextContext; |
| 1129 friend class GrPathRendering; | 1136 friend class GrPathRendering; |
| 1130 friend class GrTextContext; | 1137 friend class GrTextContext; |
| 1131 friend class GrGLPathRendering; | 1138 friend class GrGLPathRendering; |
| 1139 friend class SkScalerContext; |
| 1132 friend class SkTextToPathIter; | 1140 friend class SkTextToPathIter; |
| 1133 friend class SkCanonicalizePaint; | 1141 friend class SkCanonicalizePaint; |
| 1134 }; | 1142 }; |
| 1135 | 1143 |
| 1136 #endif | 1144 #endif |
| OLD | NEW |