[mac] Keep around more decoded image data, since it's purgeable
https://bugs.webkit.org/show_bug.cgi?id=125273
<rdar://problem/13205438>

Reviewed by Simon Fraser.

No new tests, just an optimization.

Instead of throwing away decoded image data eagerly, allow the operating
system to manage the memory via the standard purgeability mechanism,
where it can.

This improves the performance on some pathological cases (extremely large
animated GIFs) by up to 8x.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
Don't prune live resources' decoded data if it is purgeable.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
Don't eagerly throw away decoded image data if it's purgeable.

* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
(WebCore::CachedResource::decodedDataIsPurgeable):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
(WebCore::Image::decodedDataIsPurgeable):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176115 268f45cc-cd09-0410-ab3c-d52691b4dbfc