[webkit-reviews] review granted: [Bug 125273] [mac] Keep around more decoded image data, since it's purgeable : [Attachment 218481] take 1; needs more testing
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 4 18:41:13 PST 2013
Darin Adler <darin at apple.com> has granted Tim Horton <thorton at apple.com>'s
request for review:
Bug 125273: [mac] Keep around more decoded image data, since it's purgeable
https://bugs.webkit.org/show_bug.cgi?id=125273
Attachment 218481: take 1; needs more testing
https://bugs.webkit.org/attachment.cgi?id=218481&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=218481&action=review
> Source/WebCore/platform/graphics/BitmapImage.cpp:512
> unsigned BitmapImage::decodedSize() const
> {
> + // If decoded data is purgeable, for the purposes of the memory
> + // cache, pretend that it doesn't exist.
> + if (decodedDataIsPurgeable())
> + return 0;
It’s not 100% clear that this function is only suitable for use in the memory
cache. What if it was used for some other purpose in the future? Might need to
be renamed.
> Source/WebCore/platform/graphics/BitmapImage.cpp:522
> +#if !USE(CG)
> +bool BitmapImage::decodedDataIsPurgeable() const
> +{
> + return false;
> +}
> +#endif
Might be nice if this was inlined.
> Source/WebCore/platform/graphics/cg/BitmapImageCG.cpp:195
> +bool BitmapImage::decodedDataIsPurgeable() const
> +{
> +#if PLATFORM(MAC)
> + return true;
> +#else
> + return false;
> +#endif
> +}
Might be nice if this was inlined.
More information about the webkit-reviews
mailing list