diff options
author | jei.mayol <jei.mayol@gmail.com> | 2015-02-04 21:31:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-04 21:31:23 -0800 |
commit | 63af1441ceaf60a52c0b3ea11549700a0205c85d (patch) | |
tree | d2d627f76748c006af4214618d2ceebe9326f586 | |
parent | 7404c0991d4389c8415cf11a6e682b17f3bce70b (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-- | AUTHORS | 1 | ||||
-rw-r--r-- | src/images/SkImageDecoder_libgif.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -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) { |