Index: src/codec/SkWbmpCodec.cpp |
diff --git a/src/codec/SkWbmpCodec.cpp b/src/codec/SkWbmpCodec.cpp |
index 527565f6ab4484152f78909583b60400cacfccff..326fc2206a082b6d6bd6d897d8f4cce12c11c1fd 100644 |
--- a/src/codec/SkWbmpCodec.cpp |
+++ b/src/codec/SkWbmpCodec.cpp |
@@ -30,15 +30,14 @@ static inline void setup_color_table(SkColorType colorType, |
} |
} |
-static inline bool valid_color_type(SkColorType colorType, SkAlphaType alphaType) { |
+static inline bool valid_color_type(SkColorType colorType) { |
switch (colorType) { |
case kRGBA_8888_SkColorType: |
case kBGRA_8888_SkColorType: |
case kIndex_8_SkColorType: |
- return true; |
case kGray_8_SkColorType: |
case kRGB_565_SkColorType: |
- return kOpaque_SkAlphaType == alphaType; |
+ return true; |
default: |
return false; |
} |
@@ -128,7 +127,7 @@ SkCodec::Result SkWbmpCodec::onGetPixels(const SkImageInfo& info, |
return kUnimplemented; |
} |
- if (!valid_color_type(info.colorType(), info.alphaType()) || |
+ if (!valid_color_type(info.colorType()) || |
!valid_alpha(info.alphaType(), this->getInfo().alphaType())) { |
return kInvalidConversion; |
} |
@@ -196,7 +195,7 @@ SkCodec::Result SkWbmpCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, |
return kUnimplemented; |
} |
- if (!valid_color_type(dstInfo.colorType(), dstInfo.alphaType()) || |
+ if (!valid_color_type(dstInfo.colorType()) || |
!valid_alpha(dstInfo.alphaType(), this->getInfo().alphaType())) { |
return kInvalidConversion; |
} |