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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 * Describe an image's dimensions and pixel type. | 136 * Describe an image's dimensions and pixel type. |
137 */ | 137 */ |
138 struct SkImageInfo { | 138 struct SK_API SkImageInfo { |
139 public: | 139 public: |
140 SkImageInfo() {} | 140 SkImageInfo() {} |
141 | 141 |
142 int fWidth; | 142 int fWidth; |
143 int fHeight; | 143 int fHeight; |
144 SkColorType fColorType; | 144 SkColorType fColorType; |
145 SkAlphaType fAlphaType; | 145 SkAlphaType fAlphaType; |
146 | 146 |
147 private: | 147 private: |
148 enum Profile { | 148 enum Profile { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 bool isSRGB() const { return kSRGB_Profile == fProfile; } | 292 bool isSRGB() const { return kSRGB_Profile == fProfile; } |
293 | 293 |
294 /** | 294 /** |
295 * If this was tagged with an explicit gamma value, return that value, else
return 0. | 295 * If this was tagged with an explicit gamma value, return that value, else
return 0. |
296 * If this was tagged as sRGB, return 0. | 296 * If this was tagged as sRGB, return 0. |
297 */ | 297 */ |
298 float gamma() const { return fGamma; } | 298 float gamma() const { return fGamma; } |
299 }; | 299 }; |
300 | 300 |
301 #endif | 301 #endif |
OLD | NEW |