aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar jei.mayol <jei.mayol@gmail.com>2015-02-04 21:31:23 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-04 21:31:23 -0800
commit63af1441ceaf60a52c0b3ea11549700a0205c85d (patch)
treed2d627f76748c006af4214618d2ceebe9326f586
parent7404c0991d4389c8415cf11a6e682b17f3bce70b (diff)
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
-rw-r--r--AUTHORS1
-rw-r--r--src/images/SkImageDecoder_libgif.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index 3317abc57c..915393b223 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -34,3 +34,4 @@ Skia Buildbots <skia.buildbots@gmail.com>
Steve Singer <steve@ssinger.info>
The Chromium Authors <*@chromium.org>
Thiago Fransosi Farina <thiago.farina@gmail.com>
+Jose Mayol <jei.mayol@gmail.com>
diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp
index c86daf3ea3..b0ed810373 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) {