From fa2ebfe255be99c9cf5b5edab0f7d8d2ae8a0545 Mon Sep 17 00:00:00 2001 From: Sam Judd Date: Mon, 20 Nov 2017 21:48:43 -0800 Subject: [PATCH] Use Arrays.fill to clear out missing pixels in StandardGifDecoder. Progress towards #2471. --- .../com/bumptech/glide/gifdecoder/StandardGifDecoder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/third_party/gif_decoder/src/main/java/com/bumptech/glide/gifdecoder/StandardGifDecoder.java b/third_party/gif_decoder/src/main/java/com/bumptech/glide/gifdecoder/StandardGifDecoder.java index 8662835b14..01ee55c8b3 100644 --- a/third_party/gif_decoder/src/main/java/com/bumptech/glide/gifdecoder/StandardGifDecoder.java +++ b/third_party/gif_decoder/src/main/java/com/bumptech/glide/gifdecoder/StandardGifDecoder.java @@ -750,9 +750,7 @@ private void decodeBitmapData(GifFrame frame) { } // Clear missing pixels. - for (i = pi; i < npix; i++) { - mainPixels[i] = COLOR_TRANSPARENT_BLACK; - } + Arrays.fill(mainPixels, pi, npix, (byte) COLOR_TRANSPARENT_BLACK); } /**