From: jei.mayol Date: Thu, 5 Feb 2015 05:31:23 +0000 (-0800) Subject: Fix GIF transparency. X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~3721 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63af1441ceaf60a52c0b3ea11549700a0205c85d;p=platform%2Fupstream%2FlibSkiaSharp.git Fix GIF transparency. The GIF decoder, in the onDecode() function, tries to obtain the transparency info from the temporary SavedImage object, temp_save, but the decoder had been changed to save extension block data to the GifFileType object instead. As a result, find_transpIndex() can't find the correct transaprency index and returns -1. This had been reported in Android 4.4. AOSP pulled skia changes related to giflib 5.x changes after Android 4.3, which is why the problem is not reproducible in versions before KitKat. AOSP Issue 62016: https://code.google.com/p/android/issues/detail?id=62016 BUG=skia: Review URL: https://codereview.chromium.org/429053004 --- diff --git a/AUTHORS b/AUTHORS index 3317abc..915393b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -34,3 +34,4 @@ Skia Buildbots Steve Singer The Chromium Authors <*@chromium.org> Thiago Fransosi Farina +Jose Mayol diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp index c86daf3..b0ed810 100644 --- a/src/images/SkImageDecoder_libgif.cpp +++ b/src/images/SkImageDecoder_libgif.cpp @@ -477,8 +477,8 @@ SkImageDecoder::Result SkGIFImageDecoder::onDecode(SkStream* sk_stream, SkBitmap if (AddExtensionBlock(&temp_save, extData[0], &extData[1]) == GIF_ERROR) { #else - if (GifAddExtensionBlock(&gif->ExtensionBlockCount, - &gif->ExtensionBlocks, + if (GifAddExtensionBlock(&temp_save.ExtensionBlockCount, + &temp_save.ExtensionBlocks, extFunction, extData[0], &extData[1]) == GIF_ERROR) {