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

Unified Diff: src/codec/SkCodec_libpng.cpp

Issue 1277593002: Support decoding PNG to 565. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libpng.cpp
diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp
index d29ca8a2a300bbc2635a93c05b6b8c33d1fca220..b2706ba1baf13153451a0a5a88594663a4021850 100644
--- a/src/codec/SkCodec_libpng.cpp
+++ b/src/codec/SkCodec_libpng.cpp
@@ -419,6 +419,8 @@ static bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src)
switch (dst.colorType()) {
case kN32_SkColorType:
return true;
+ case kRGB_565_SkColorType:
+ return src.alphaType() == kOpaque_SkAlphaType;
default:
return dst.colorType() == src.colorType();
}
« no previous file with comments | « no previous file | src/codec/SkSwizzler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698