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

Unified Diff: src/codec/SkCodecPriv.h

Issue 1996993003: Finish supporting decoding opaque to non-opaque (Closed) Base URL: https://skia.googlesource.com/skia.git@opaque
Patch Set: Add tests Created 4 years, 7 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 1694784785c8f4f32050c643275369e53ad4d4c6..6771ef72b8fe7dfabcc78af8048cbf6bffb65887 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -132,12 +132,7 @@ inline bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src)
case kBGRA_8888_SkColorType:
return true;
case kRGB_565_SkColorType:
- return kOpaque_SkAlphaType == dst.alphaType();
- case kGray_8_SkColorType:
- if (kOpaque_SkAlphaType != dst.alphaType()) {
- return false;
- }
- // Fall through
+ return kOpaque_SkAlphaType == src.alphaType();
default:
return dst.colorType() == src.colorType();
}
« dm/DMSrcSink.cpp ('K') | « dm/DMSrcSink.cpp ('k') | src/codec/SkWbmpCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698