Bug 170591 - [GTK] Animations not played properly when using synchronous decoding
Summary: [GTK] Animations not played properly when using synchronous decoding
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Miguel Gomez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-07 02:17 PDT by Miguel Gomez
Modified: 2017-04-13 17:32 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.62 KB, patch)
2017-04-07 02:36 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Gomez 2017-04-07 02:17:36 PDT
For PNG and GIF images, async decoding is used if the file size is bigger than a threshold, otherwise sync decoding is used.

Bug 170333, which happens because async decoding stopped being used, revealed that sync decoding is not working properly.
Comment 1 Miguel Gomez 2017-04-07 02:27:43 PDT
There seems to be an error in ImageFrameCache::destroyDecodedData(). Theoretically this should destroy all the decoded frames except one we want to keep, but what it's actually doing is destroying all the odd ones (including the one we want to keep if it's odd).
Comment 2 Miguel Gomez 2017-04-07 02:36:44 PDT
Created attachment 306481 [details]
Patch
Comment 3 Carlos Garcia Campos 2017-04-07 02:38:18 PDT
Comment on attachment 306481 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=306481&action=review

> Source/WebCore/platform/graphics/ImageFrameCache.cpp:101
> -        decodedSize += m_frames[index++].clearImage();
> +        decodedSize += m_frames[index].clearImage();

oh! good catch!
Comment 4 WebKit Commit Bot 2017-04-07 05:52:30 PDT
Comment on attachment 306481 [details]
Patch

Clearing flags on attachment: 306481

Committed r215091: <http://trac.webkit.org/changeset/215091>
Comment 5 WebKit Commit Bot 2017-04-07 05:52:31 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Said Abou-Hallawa 2017-04-13 17:32:24 PDT
<rdar://problem/31617277>