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 |
11 #include "SkColor.h" | 11 #include "SkColor.h" |
12 #include "SkDrawLooper.h" | 12 #include "SkDrawLooper.h" |
13 #include "SkFilterQuality.h" | 13 #include "SkFilterQuality.h" |
14 #include "SkMatrix.h" | 14 #include "SkMatrix.h" |
15 #include "SkXfermode.h" | 15 #include "SkXfermode.h" |
16 | 16 |
17 class SkAnnotation; | 17 class SkAnnotation; |
18 class SkAutoDescriptor; | 18 class SkAutoDescriptor; |
19 class SkAutoGlyphCache; | 19 class SkAutoGlyphCache; |
20 class SkColorFilter; | 20 class SkColorFilter; |
21 class SkData; | 21 class SkData; |
22 class SkDescriptor; | 22 class SkDescriptor; |
23 struct SkDeviceProperties; | |
24 class SkReadBuffer; | 23 class SkReadBuffer; |
25 class SkWriteBuffer; | 24 class SkWriteBuffer; |
26 class SkGlyph; | 25 class SkGlyph; |
27 struct SkRect; | 26 struct SkRect; |
28 class SkGlyphCache; | 27 class SkGlyphCache; |
29 class SkImageFilter; | 28 class SkImageFilter; |
30 class SkMaskFilter; | 29 class SkMaskFilter; |
31 class SkPath; | 30 class SkPath; |
32 class SkPathEffect; | 31 class SkPathEffect; |
33 struct SkPoint; | 32 struct SkPoint; |
34 class SkRasterizer; | 33 class SkRasterizer; |
35 class SkShader; | 34 class SkShader; |
| 35 class SkSurfaceProps; |
36 class SkTypeface; | 36 class SkTypeface; |
37 | 37 |
38 typedef const SkGlyph& (*SkDrawCacheProc)(SkGlyphCache*, const char**, | 38 typedef const SkGlyph& (*SkDrawCacheProc)(SkGlyphCache*, const char**, |
39 SkFixed x, SkFixed y); | 39 SkFixed x, SkFixed y); |
40 | 40 |
41 typedef const SkGlyph& (*SkMeasureCacheProc)(SkGlyphCache*, const char**); | 41 typedef const SkGlyph& (*SkMeasureCacheProc)(SkGlyphCache*, const char**); |
42 | 42 |
43 #define kBicubicFilterBitmap_Flag kHighQualityFilterBitmap_Flag | 43 #define kBicubicFilterBitmap_Flag kHighQualityFilterBitmap_Flag |
44 | 44 |
45 /** \class SkPaint | 45 /** \class SkPaint |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1059 SkDrawCacheProc getDrawCacheProc() const; | 1059 SkDrawCacheProc getDrawCacheProc() const; |
1060 SkMeasureCacheProc getMeasureCacheProc(bool needFullMetrics) const; | 1060 SkMeasureCacheProc getMeasureCacheProc(bool needFullMetrics) const; |
1061 | 1061 |
1062 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, | 1062 SkScalar measure_text(SkGlyphCache*, const char* text, size_t length, |
1063 int* count, SkRect* bounds) const; | 1063 int* count, SkRect* bounds) const; |
1064 | 1064 |
1065 /* | 1065 /* |
1066 * Allocs an SkDescriptor on the heap and return it to the caller as a refcn
ted | 1066 * Allocs an SkDescriptor on the heap and return it to the caller as a refcn
ted |
1067 * SkData. Caller is responsible for managing the lifetime of this object. | 1067 * SkData. Caller is responsible for managing the lifetime of this object. |
1068 */ | 1068 */ |
1069 void getScalerContextDescriptor(SkAutoDescriptor*, const SkDeviceProperties*
deviceProperties, | 1069 void getScalerContextDescriptor(SkAutoDescriptor*, const SkSurfaceProps& sur
faceProps, |
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 SkSurfaceProps* surfaceProps, 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 SkSurfaceProps* surfaceProps, const SkMatrix* devi
ceMatrix, |
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) const; |
1078 | 1078 |
1079 /* | 1079 /* |
1080 * The luminance color is used to determine which Gamma Canonical color to m
ap to. This is | 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 | 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. | 1082 * they need to generate new masks based off a given color. |
1083 */ | 1083 */ |
1084 SkColor computeLuminanceColor() const; | 1084 SkColor computeLuminanceColor() const; |
1085 | 1085 |
1086 static void Term(); | 1086 static void Term(); |
1087 | 1087 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 friend class GrStencilAndCoverTextContext; | 1135 friend class GrStencilAndCoverTextContext; |
1136 friend class GrPathRendering; | 1136 friend class GrPathRendering; |
1137 friend class GrTextContext; | 1137 friend class GrTextContext; |
1138 friend class GrGLPathRendering; | 1138 friend class GrGLPathRendering; |
1139 friend class SkScalerContext; | 1139 friend class SkScalerContext; |
1140 friend class SkTextToPathIter; | 1140 friend class SkTextToPathIter; |
1141 friend class SkCanonicalizePaint; | 1141 friend class SkCanonicalizePaint; |
1142 }; | 1142 }; |
1143 | 1143 |
1144 #endif | 1144 #endif |
OLD | NEW |