Remove unnecessary check

Follow-on from crrev.com/1996993003

No need to check the alpha type. If the color type is gray, the
source alpha type will be opaque.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002723002

Review-Url: https://codereview.chromium.org/2002723002
This commit is contained in:
scroggo 2016-05-20 14:27:16 -07:00 committed by Commit bot
parent ba5848953e
commit 1a3619236b

View File

@ -323,8 +323,7 @@ static bool get_decode_info(SkImageInfo* decodeInfo, SkColorType canvasColorType
*decodeInfo = decodeInfo->makeColorType(kIndex_8_SkColorType);
break;
case CodecSrc::kGrayscale_Always_DstColorType:
if (kRGB_565_SkColorType == canvasColorType ||
kOpaque_SkAlphaType != decodeInfo->alphaType()) {
if (kRGB_565_SkColorType == canvasColorType) {
return false;
}
*decodeInfo = decodeInfo->makeColorType(kGray_8_SkColorType);