| 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 |
| 146 /////////////////////////////////////////////////////////////////////////////// |
| 147 |
| 148 /** |
| 136 * Describe an image's dimensions and pixel type. | 149 * Describe an image's dimensions and pixel type. |
| 137 */ | 150 */ |
| 138 struct SkImageInfo { | 151 struct SkImageInfo { |
| 139 public: | 152 public: |
| 140 SkImageInfo() | 153 SkImageInfo() |
| 141 : fWidth(0) | 154 : fWidth(0) |
| 142 , fHeight(0) | 155 , fHeight(0) |
| 143 , fColorType(kUnknown_SkColorType) | 156 , fColorType(kUnknown_SkColorType) |
| 144 , fAlphaType(kIgnore_SkAlphaType) | 157 , fAlphaType(kIgnore_SkAlphaType) |
| 145 {} | 158 {} |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 private: | 276 private: |
| 264 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at) | 277 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at) |
| 265 : fWidth(width) | 278 : fWidth(width) |
| 266 , fHeight(height) | 279 , fHeight(height) |
| 267 , fColorType(ct) | 280 , fColorType(ct) |
| 268 , fAlphaType(at) | 281 , fAlphaType(at) |
| 269 {} | 282 {} |
| 270 }; | 283 }; |
| 271 | 284 |
| 272 #endif | 285 #endif |
| OLD | NEW |