diff options
Diffstat (limited to 'include/core/SkImageInfo.h')
-rw-r--r-- | include/core/SkImageInfo.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h index f928416fe7..d915c09255 100644 --- a/include/core/SkImageInfo.h +++ b/include/core/SkImageInfo.h @@ -19,12 +19,7 @@ class SkWriteBuffer; * Describes how to interpret the alpha compoent of a pixel. */ enum SkAlphaType { - /** - * All pixels should be treated as opaque, regardless of the value stored - * in their alpha field. Used for legacy images that wrote 0 or garbarge - * in their alpha field, but intended the RGB to be treated as opaque. - */ - kIgnore_SkAlphaType, + kUnknown_SkAlphaType, /** * All pixels are stored as opaque. This differs slightly from kIgnore in @@ -53,11 +48,7 @@ enum SkAlphaType { }; static inline bool SkAlphaTypeIsOpaque(SkAlphaType at) { - SK_COMPILE_ASSERT(kIgnore_SkAlphaType < kOpaque_SkAlphaType, bad_alphatype_order); - SK_COMPILE_ASSERT(kPremul_SkAlphaType > kOpaque_SkAlphaType, bad_alphatype_order); - SK_COMPILE_ASSERT(kUnpremul_SkAlphaType > kOpaque_SkAlphaType, bad_alphatype_order); - - return (unsigned)at <= kOpaque_SkAlphaType; + return kOpaque_SkAlphaType == at; } static inline bool SkAlphaTypeIsValid(unsigned value) { @@ -161,7 +152,7 @@ public: : fWidth(0) , fHeight(0) , fColorType(kUnknown_SkColorType) - , fAlphaType(kIgnore_SkAlphaType) + , fAlphaType(kUnknown_SkAlphaType) , fProfileType(kLinear_SkColorProfileType) {} @@ -200,7 +191,7 @@ public: } static SkImageInfo MakeUnknown(int width, int height) { - return SkImageInfo(width, height, kUnknown_SkColorType, kIgnore_SkAlphaType, + return SkImageInfo(width, height, kUnknown_SkColorType, kUnknown_SkAlphaType, kLinear_SkColorProfileType); } |