OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
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 SkSwizzler_DEFINED | 8 #ifndef SkSwizzler_DEFINED |
9 #define SkSwizzler_DEFINED | 9 #define SkSwizzler_DEFINED |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 kIndex2, | 26 kIndex2, |
27 kIndex4, | 27 kIndex4, |
28 kIndex, | 28 kIndex, |
29 kRGB, | 29 kRGB, |
30 kBGR, | 30 kBGR, |
31 kRGBX, | 31 kRGBX, |
32 kBGRX, | 32 kBGRX, |
33 kRGBA, | 33 kRGBA, |
34 kBGRA, | 34 kBGRA, |
35 kRGB_565, | 35 kRGB_565, |
| 36 kCMYK, |
36 }; | 37 }; |
37 | 38 |
38 /* | 39 /* |
39 * | 40 * |
40 * Result code for the alpha components of a row. | 41 * Result code for the alpha components of a row. |
41 * | 42 * |
42 */ | 43 */ |
43 typedef uint16_t ResultAlpha; | 44 typedef uint16_t ResultAlpha; |
44 static const ResultAlpha kOpaque_ResultAlpha = 0xFFFF; | 45 static const ResultAlpha kOpaque_ResultAlpha = 0xFFFF; |
45 static const ResultAlpha kTransparent_ResultAlpha = 0x0000; | 46 static const ResultAlpha kTransparent_ResultAlpha = 0x0000; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 return 8; | 91 return 8; |
91 case kRGB_565: | 92 case kRGB_565: |
92 return 16; | 93 return 16; |
93 case kRGB: | 94 case kRGB: |
94 case kBGR: | 95 case kBGR: |
95 return 24; | 96 return 24; |
96 case kRGBX: | 97 case kRGBX: |
97 case kRGBA: | 98 case kRGBA: |
98 case kBGRX: | 99 case kBGRX: |
99 case kBGRA: | 100 case kBGRA: |
| 101 case kCMYK: |
100 return 32; | 102 return 32; |
101 default: | 103 default: |
102 SkASSERT(false); | 104 SkASSERT(false); |
103 return 0; | 105 return 0; |
104 } | 106 } |
105 } | 107 } |
106 | 108 |
107 /* | 109 /* |
108 * | 110 * |
109 * Returns bytes per pixel for source config | 111 * Returns bytes per pixel for source config |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // fBPP is bytesPerPixel | 187 // fBPP is bytesPerPixel |
186 // else | 188 // else |
187 // fBPP is bitsPerPixel | 189 // fBPP is bitsPerPixel |
188 | 190 |
189 SkSwizzler(RowProc proc, const SkPMColor* ctable, int srcOffset, int subsetW
idth, int bpp); | 191 SkSwizzler(RowProc proc, const SkPMColor* ctable, int srcOffset, int subsetW
idth, int bpp); |
190 | 192 |
191 int onSetSampleX(int) override; | 193 int onSetSampleX(int) override; |
192 | 194 |
193 }; | 195 }; |
194 #endif // SkSwizzler_DEFINED | 196 #endif // SkSwizzler_DEFINED |
OLD | NEW |