[Webkit-unassigned] [Bug 176089] [GTK][WPE] Fix playback of GIFs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 26 05:06:11 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=176089

--- Comment #16 from Miguel Gomez <magomez at igalia.com> ---
> So I think we have at least 3 bugs:
> 
>  - 1) Slow playback of GIFs on first loop (that seems to be fixed by your
> suggested fix of commenting out the deletion of the m_reader)
>  - 2) Slow decoding of the GIFs (even when loading from disk)
>  - 3) Huge memory usage of long GIFs.

Without checking this concrete issue carefully (maybe this changed lately), some comments.

- The image decoding is not something that happens once. When enough decoded images are stored and they reach a concrete size, stored frames will be deleted to keep the size under control. Due to this it can happen that frames are not requested in the common order. This is the reason behind the destruction of m_reader, which would expect to be requested the next frame in the animation but it can actually be requested a former frame, and that causes that wrong frames are being drawn. I'm not sure whether we can somehow reposition the reader instead of destroying it, we need to check that.

- Regarding the memory usage, there should be this limit I mentioned to avoid it (the LargeAnimationCutoff metioned by Zan). If you remove it, then all the decoded frames are stored and that makes the second play smoother, but consumes a lot of memory on large animations. Also, during the first play, there won't be requests to delete decoded frames, which means that the m_reader won't be destroyed and the decoding will be faster.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170926/bb491a41/attachment.html>


More information about the webkit-unassigned mailing list