OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 SkImageInfo_DEFINED | 8 #ifndef SkImageInfo_DEFINED |
9 #define SkImageInfo_DEFINED | 9 #define SkImageInfo_DEFINED |
10 | 10 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 /** | 126 /** |
127 * Return true if alphaType is supported by colorType. If there is a canonical | 127 * Return true if alphaType is supported by colorType. If there is a canonical |
128 * alphaType for this colorType, return it in canonical. | 128 * alphaType for this colorType, return it in canonical. |
129 */ | 129 */ |
130 bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType, | 130 bool SkColorTypeValidateAlphaType(SkColorType colorType, SkAlphaType alphaType, |
131 SkAlphaType* canonical = NULL); | 131 SkAlphaType* canonical = NULL); |
132 | 132 |
133 /////////////////////////////////////////////////////////////////////////////// | 133 /////////////////////////////////////////////////////////////////////////////// |
134 | 134 |
135 /** | 135 /** |
| 136 * Describes the color space a YUV pixel. |
| 137 */ |
| 138 enum SkYUVColorSpace { |
| 139 /** Standard JPEG color space. */ |
| 140 kJPEG_SkYUVColorSpace, |
| 141 /** SDTV standard Rec. 601 color space. Uses "studio swing" [16, 235] color |
| 142 range. See http://en.wikipedia.org/wiki/Rec._601 for details. */ |
| 143 kRec601_SkYUVColorSpace, |
| 144 |
| 145 kLastEnum_SkYUVColorSpace = kRec601_SkYUVColorSpace |
| 146 }; |
| 147 |
| 148 /////////////////////////////////////////////////////////////////////////////// |
| 149 |
| 150 /** |
136 * Describe an image's dimensions and pixel type. | 151 * Describe an image's dimensions and pixel type. |
137 */ | 152 */ |
138 struct SkImageInfo { | 153 struct SkImageInfo { |
139 public: | 154 public: |
140 SkImageInfo() | 155 SkImageInfo() |
141 : fWidth(0) | 156 : fWidth(0) |
142 , fHeight(0) | 157 , fHeight(0) |
143 , fColorType(kUnknown_SkColorType) | 158 , fColorType(kUnknown_SkColorType) |
144 , fAlphaType(kIgnore_SkAlphaType) | 159 , fAlphaType(kIgnore_SkAlphaType) |
145 {} | 160 {} |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 private: | 278 private: |
264 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at) | 279 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at) |
265 : fWidth(width) | 280 : fWidth(width) |
266 , fHeight(height) | 281 , fHeight(height) |
267 , fColorType(ct) | 282 , fColorType(ct) |
268 , fAlphaType(at) | 283 , fAlphaType(at) |
269 {} | 284 {} |
270 }; | 285 }; |
271 | 286 |
272 #endif | 287 #endif |
OLD | NEW |