New issue
Advanced search Search tips

Issue 773548 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

GIFImageDecoder::Decode() should exit early when the frame is already complete

Project Member Reported by cblume@chromium.org, Oct 11 2017

Issue description

Inside GIFImageDecoder::Decode(), if this current frame is empty and it depends on a prior frame, we always call Decode(some_prior_frame). We even call it if the prior frame is already complete.

Inside Decode(), we won't exit early if the frame is already complete. So we'll end up always calling codec_->incrementalDecode().

This seems a bit wrong.

Suppose we are decoding frame 6 and the prior frame can be any of 3, 4, or 5. We could potentially provide frame 4. But the last startIncrementalDecode() may have been for frame 5. So when we call incrementalDecode(), we're really working on frame 5 even though the |index| param here would have been 4.

This seems to not be a huge problem because we don't decode a frame until it is complete. But that is not the case in the unit tests. And because this detail is so subtle I think we should just address it.
 
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0ffa5c7b260f5ac3290bad107d5b74faba967ceb

commit 0ffa5c7b260f5ac3290bad107d5b74faba967ceb
Author: Chris Blume <cblume@chromium.org>
Date: Wed Sep 19 22:58:02 2018

Reland SkGifCodec

SkGifCodec work was reverted as a suspected cause of a paint regression.
But it may end up being unrelated.

This is a revert of crrev.com/c/718918

Bug: 768878, 778164 , 773548 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ifb72574cf2012d417c223193cbd14b52ec644b9a
Reviewed-on: https://chromium-review.googlesource.com/783647
Commit-Queue: Chris Blume <cblume@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#592590}
[modify] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/skia/BUILD.gn
[modify] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/BUILD.gn
[modify] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/gif/gif_image_decoder.cc
[modify] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/gif/gif_image_decoder.h
[modify] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/gif/gif_image_decoder_test.cc
[delete] https://crrev.com/72aa1d1634061e0de286f2dc3291d7791d7f1b40/third_party/blink/renderer/platform/image-decoders/gif/gif_image_reader.cc
[delete] https://crrev.com/72aa1d1634061e0de286f2dc3291d7791d7f1b40/third_party/blink/renderer/platform/image-decoders/gif/gif_image_reader.h
[modify] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/image_decoder.h
[modify] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/image_frame.cc
[modify] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/image_frame.h
[add] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/segment_stream.cc
[add] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/segment_stream.h
[add] https://crrev.com/0ffa5c7b260f5ac3290bad107d5b74faba967ceb/third_party/blink/renderer/platform/image-decoders/segment_stream_test.cc

Status: Fixed (was: Started)

Sign in to add a comment