Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/codec/SkSwizzler.h

Issue 1411083009: Use SkSwizzler to convert from CMYK (Closed) Base URL: https://skia.googlesource.com/skia.git@NewFromData
Patch Set: Add missing break statement Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/codec/SkJpegCodec.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « src/codec/SkJpegCodec.cpp ('k') | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698