[Webkit-unassigned] [Bug 244128] Add experimental feature to disable Bitmap image animations

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 30 15:01:55 PDT 2022


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

--- Comment #35 from Joshua Hoffman <jhoffman23 at apple.com> ---
(In reply to Simon Fraser (smfr) from comment #34)
> (In reply to Joshua Hoffman from comment #33)
> > (In reply to Simon Fraser (smfr) from comment #31)
> > 
> > > > Source/WebCore/platform/graphics/BitmapImage.cpp:378
> > > > +    return repetitionCount() && !m_animationFinished && imageObserver() && (imageObserver()->hasPageResumedAnimationWhenSettingEnabled() || !m_disableAnimation || m_allowAnimationWhenSettingEnabled );
> > > 
> > > Why doesn't the call out to imageObserver do the job of consulting the
> > > setting and whether animations have been re-enabled? It would be better if
> > > BitmapImage didn't have to store m_disableAnimation and
> > > m_allowAnimationWhenSettingEnabled
> > > 
> > 
> > This will work for m_disableAnimation & for checking if page-wide animations
> > are resumed (I'll move those there), but m_allowAnimationWhenSettingEnabled
> > is used if just one image needs to animate, and not the whole page.
> 
> Ah, I didn't realize there was a per-image override.
> 
> One issue here is that multiple copies of the same image animate "in sync";
> 10 image elements with the same GIF all render the same frame at the same
> time.
> 
> If the user is able to stop and start just some of these, it means that
> we'll be rendering different frames of the same GIF in different places
> which can get very slow (since decoding a frame may have to decode all the
> previous frames, if you're not showing the frame that was previously cached).

The concession with this patch is that individually playing one image, if there are copies, will play all of the duplicates as well. This should prevent the issue you raised.

-- 
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/20220830/0cb4461a/attachment.htm>


More information about the webkit-unassigned mailing list