| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 311 |
| 312 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at, SkColorPr
ofileType pt) | 312 SkImageInfo(int width, int height, SkColorType ct, SkAlphaType at, SkColorPr
ofileType pt) |
| 313 : fWidth(width) | 313 : fWidth(width) |
| 314 , fHeight(height) | 314 , fHeight(height) |
| 315 , fColorType(ct) | 315 , fColorType(ct) |
| 316 , fAlphaType(at) | 316 , fAlphaType(at) |
| 317 , fProfileType(pt) | 317 , fProfileType(pt) |
| 318 {} | 318 {} |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 /////////////////////////////////////////////////////////////////////////////// |
| 322 |
| 323 static inline bool SkColorAndProfileAreGammaCorrect(SkColorType ct, SkColorProfi
leType pt) { |
| 324 return kSRGB_SkColorProfileType == pt || kRGBA_F16_SkColorType == ct; |
| 325 } |
| 326 |
| 327 static inline bool SkImageInfoIsGammaCorrect(const SkImageInfo& info) { |
| 328 return SkColorAndProfileAreGammaCorrect(info.colorType(), info.profileType()
); |
| 329 } |
| 330 |
| 321 #endif | 331 #endif |
| OLD | NEW |