| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 SkEncodedInfo_DEFINED | 8 #ifndef SkEncodedInfo_DEFINED |
| 9 #define SkEncodedInfo_DEFINED | 9 #define SkEncodedInfo_DEFINED |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 kYUVA_Color, | 57 kYUVA_Color, |
| 58 | 58 |
| 59 // JPEG | 59 // JPEG |
| 60 // Photoshop actually writes inverted CMYK data into JPEGs, where zero | 60 // Photoshop actually writes inverted CMYK data into JPEGs, where zero |
| 61 // represents 100% ink coverage. For this reason, we treat CMYK JPEGs | 61 // represents 100% ink coverage. For this reason, we treat CMYK JPEGs |
| 62 // as having inverted CMYK. libjpeg-turbo warns that this may break | 62 // as having inverted CMYK. libjpeg-turbo warns that this may break |
| 63 // other applications, but the CMYK JPEGs we see on the web expect to | 63 // other applications, but the CMYK JPEGs we see on the web expect to |
| 64 // be treated as inverted CMYK. | 64 // be treated as inverted CMYK. |
| 65 kInvertedCMYK_Color, | 65 kInvertedCMYK_Color, |
| 66 kYCCK_Color, | 66 kYCCK_Color, |
| 67 | |
| 68 // Used internally to indicate that the decoding library has | |
| 69 // pre-swizzled to the desired output format. | |
| 70 kPreSwizzled_Color, | |
| 71 }; | 67 }; |
| 72 | 68 |
| 73 static SkEncodedInfo Make(Color color, Alpha alpha, int bitsPerComponent) { | 69 static SkEncodedInfo Make(Color color, Alpha alpha, int bitsPerComponent) { |
| 74 SkASSERT(1 == bitsPerComponent || | 70 SkASSERT(1 == bitsPerComponent || |
| 75 2 == bitsPerComponent || | 71 2 == bitsPerComponent || |
| 76 4 == bitsPerComponent || | 72 4 == bitsPerComponent || |
| 77 8 == bitsPerComponent || | 73 8 == bitsPerComponent || |
| 78 16 == bitsPerComponent); | 74 16 == bitsPerComponent); |
| 79 | 75 |
| 80 switch (color) { | 76 switch (color) { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 } | 196 } |
| 201 | 197 |
| 202 Color fColor; | 198 Color fColor; |
| 203 Alpha fAlpha; | 199 Alpha fAlpha; |
| 204 uint8_t fBitsPerComponent; | 200 uint8_t fBitsPerComponent; |
| 205 | 201 |
| 206 friend class SkJpegCodec; | 202 friend class SkJpegCodec; |
| 207 }; | 203 }; |
| 208 | 204 |
| 209 #endif | 205 #endif |
| OLD | NEW |