Chromium Code Reviews| Index: include/core/SkImageInfo.h |
| diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h |
| index b2dda3f02178f2f2e241c92a06b683ddf4a9d15e..c55edd36c2252bc38fa2ad581875e839aa8a0ef5 100644 |
| --- a/include/core/SkImageInfo.h |
| +++ b/include/core/SkImageInfo.h |
| @@ -318,4 +318,14 @@ private: |
| {} |
| }; |
| +/////////////////////////////////////////////////////////////////////////////// |
| + |
| +static inline bool SkColorAndProfileAreGammaCorrect(SkColorType ct, SkColorProfileType pt) { |
|
reed1
2016/04/04 21:12:29
doe these need to be public?
Brian Osman
2016/04/04 21:42:35
Probably not. They're intended to be used just ins
|
| + return kSRGB_SkColorProfileType == pt || kRGBA_F16_SkColorType == ct; |
| +} |
| + |
| +static inline bool SkImageInfoIsGammaCorrect(const SkImageInfo& info) { |
| + return SkColorAndProfileAreGammaCorrect(info.colorType(), info.profileType()); |
| +} |
| + |
| #endif |