New issue
Advanced search Search tips

Issue 745967 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Save the correct frame in cache (rather than a guess)

Project Member Reported by cblume@chromium.org, Jul 18 2017

Issue description

ImageDecoder::ClearCacheExceptFrame() has to keep an eligible previous reference frame if the current frame's disposal method is DisposePrevious. It needs a previous frame that it can use after being disposed.

The problem is after decoding frame i, we keep an eligible reference frame for frame i. Really, we need an eligible reference frame for i+1.

There is a chance that the eligible reference frame list is the same. But there is also a change that we save a frame that isn't an eligible reference frame for i+1.

Saving the wrong frame in cache would force us to re-decode possibly several frames to get an eligible reference frame.


What's more, the image decoders may have been provided enough data to parse frame i+1 and know in advance which frame should be saved. It is possible that this would be a free optimization.
 

Sign in to add a comment