Index: src/images/SkImageDecoder_libpng.cpp |
diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp |
index c074268cffbc996ef1b0f01765402f806504ba8c..117c7f6b3411f277615b2c836d1ac2bc41a62320 100644 |
--- a/src/images/SkImageDecoder_libpng.cpp |
+++ b/src/images/SkImageDecoder_libpng.cpp |
@@ -375,6 +375,11 @@ SkImageDecoder::Result SkPNGImageDecoder::onDecode(SkStream* sk_stream, SkBitmap |
const int number_passes = (interlaceType != PNG_INTERLACE_NONE) ? |
png_set_interlace_handling(png_ptr) : 1; |
+ if (number_passes > 1) { |
+ // For simplified comparison, only do the ones that are not interlaced. |
+ return kFailure; |
+ } |
+ |
/* Optional call to gamma correct and add the background to the palette |
* and update info structure. REQUIRED if you are expecting libpng to |
* update the palette for you (ie you selected such a transform above). |