[Webkit-unassigned] [Bug 90721] Don't destory the decoded data of an image if WebKit is about to render the image.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 7 11:10:09 PDT 2012


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


Simon Fraser (smfr) <simon.fraser at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #151136|review?                     |review-
               Flag|                            |




--- Comment #3 from Simon Fraser (smfr) <simon.fraser at apple.com>  2012-07-07 11:10:09 PST ---
(From update of attachment 151136)
View in context: https://bugs.webkit.org/attachment.cgi?id=151136&action=review

> Source/WebCore/ChangeLog:8
> +        When the cache capacity of MemoryCache is exceeded, decoded data of all

... the MemoryCache
... the decoded data of all the CachedImages

> Source/WebCore/ChangeLog:15
> +        Therefore, it is better not to destory the decoded data of an image if the image

better to not destroy

> Source/WebCore/ChangeLog:37
> +        No new tests - no behavior changes. Only space-time tradeoff change.

There is a behavior change, which you note above. GIFs outside the viewport won't keep animating. Not sure if that's testable though.

> Source/WebCore/loader/cache/CachedImage.cpp:420
> +        CachedResourceClientWalker<CachedImageClient> w(m_clients);

Please use a longer variable name than 'w'.

> Source/WebCore/loader/cache/CachedImage.cpp:423
> +            if (c->willRenderImage(this))
> +                return;

It's odd that a method called destroyDecodedData() doesn't always do so. Maybe rename to destroyDecodedDataIfPossible(), or add CachedImage::likelyToRenderSoon() and call it somewhere.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list