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
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 3384897..f27acf2 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -323,8 +323,7 @@
*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);