Chromium Code Reviews| Index: src/codec/SkCodec_libpng.cpp |
| diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp |
| index bf0647dd24aeca259738708644782c8ace2db3be..57653e74df30b44f379a755a2640f2030b3162a1 100644 |
| --- a/src/codec/SkCodec_libpng.cpp |
| +++ b/src/codec/SkCodec_libpng.cpp |
| @@ -347,19 +347,19 @@ SkPngCodec::~SkPngCodec() { |
| // Getting the pixels |
| /////////////////////////////////////////////////////////////////////////////// |
| -static bool conversion_possible(const SkImageInfo& A, const SkImageInfo& B) { |
| +static bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src) { |
| // TODO: Support other conversions |
| - if (A.colorType() != B.colorType()) { |
| + if (dst.colorType() != src.colorType()) { |
| return false; |
| } |
| - if (A.profileType() != B.profileType()) { |
| + if (dst.profileType() != src.profileType()) { |
|
scroggo
2015/03/18 13:33:20
BMP doesn't make this check, but it should. (I'm g
msarett
2015/03/18 14:09:12
Done.
|
| return false; |
| } |
| - if (A.alphaType() == B.alphaType()) { |
| + if (dst.alphaType() == src.alphaType()) { |
| return true; |
| } |
| - return premul_and_unpremul(A.alphaType(), B.alphaType()) |
| - || premul_and_unpremul(B.alphaType(), A.alphaType()); |
| + return kPremul_SkAlphaType == dst.alphaType() && |
| + kUnpremul_SkAlphaType == src.alphaType(); |
| } |
| SkCodec::Result SkPngCodec::onGetPixels(const SkImageInfo& requestedInfo, void* dst, |