Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: src/codec/SkCodecPriv.h

Issue 1695473002: Fix colorType/alphaType checks in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Consistently require that kGray8 decodes be opaque Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/codec/SkCodecPriv.h
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h
index 235c4e24aff3bcbc56787487824170c33f6fd4fa..bcbd67b8f5fccba8e75a1926ad0aae0c0d5cd325 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -136,6 +136,7 @@ inline bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src)
case kN32_SkColorType:
return true;
case kRGB_565_SkColorType:
+ case kGray_8_SkColorType:
scroggo 2016/02/12 17:13:55 So if the Source is N32 and has no alpha, we will
msarett 2016/02/12 17:41:31 Oops this is not what I meant to do. Just want to
return src.alphaType() == kOpaque_SkAlphaType;
default:
return dst.colorType() == src.colorType();

Powered by Google App Engine
This is Rietveld 408576698