Index: src/images/SkImageDecoder_libpng.cpp |
diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp |
index 245654dbfd3dbcb3c735b1f8ccdb44fe26433a8a..89b88d1b2fd0125bf54fefa808f74943c90dcb60 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). |