Diff
Modified: trunk/Source/WebCore/ChangeLog (176109 => 176110)
--- trunk/Source/WebCore/ChangeLog 2014-11-14 01:07:48 UTC (rev 176109)
+++ trunk/Source/WebCore/ChangeLog 2014-11-14 01:15:34 UTC (rev 176110)
@@ -1,3 +1,17 @@
+2014-11-13 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r176106.
+ https://bugs.webkit.org/show_bug.cgi?id=138719
+
+ needs build love (Requested by kling on #webkit).
+
+ Reverted changeset:
+
+ "[mac] Keep around more decoded image data, since it's
+ purgeable"
+ https://bugs.webkit.org/show_bug.cgi?id=125273
+ http://trac.webkit.org/changeset/176106
+
2014-11-13 Eric Carlson <[email protected]>
Context menus should not offer the "Download video" option for videos that cannot
Modified: trunk/Source/WebCore/loader/cache/CachedImage.h (176109 => 176110)
--- trunk/Source/WebCore/loader/cache/CachedImage.h 2014-11-14 01:07:48 UTC (rev 176109)
+++ trunk/Source/WebCore/loader/cache/CachedImage.h 2014-11-14 01:15:34 UTC (rev 176110)
@@ -24,7 +24,6 @@
#define CachedImage_h
#include "CachedResource.h"
-#include "Image.h"
#include "ImageObserver.h"
#include "IntRect.h"
#include "IntSizeHash.h"
@@ -116,8 +115,6 @@
virtual bool stillNeedsLoad() const override { return !errorOccurred() && status() == Unknown && !isLoading(); }
- virtual bool decodedDataIsPurgeable() const override { return m_image && m_image->decodedDataIsPurgeable(); }
-
// ImageObserver
virtual void decodedSizeChanged(const Image*, int delta) override;
virtual void didDraw(const Image*) override;
Modified: trunk/Source/WebCore/loader/cache/CachedResource.h (176109 => 176110)
--- trunk/Source/WebCore/loader/cache/CachedResource.h 2014-11-14 01:07:48 UTC (rev 176109)
+++ trunk/Source/WebCore/loader/cache/CachedResource.h 2014-11-14 01:15:34 UTC (rev 176110)
@@ -144,8 +144,6 @@
unsigned encodedSize() const { return m_encodedSize; }
unsigned decodedSize() const { return m_decodedSize; }
unsigned overheadSize() const;
-
- virtual bool decodedDataIsPurgeable() const { return false; }
bool isLoaded() const { return !m_loading; } // FIXME. Method name is inaccurate. Loading might not have started yet.
Modified: trunk/Source/WebCore/loader/cache/MemoryCache.cpp (176109 => 176110)
--- trunk/Source/WebCore/loader/cache/MemoryCache.cpp 2014-11-14 01:07:48 UTC (rev 176109)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.cpp 2014-11-14 01:15:34 UTC (rev 176110)
@@ -342,11 +342,6 @@
if (!shouldDestroyDecodedDataForAllLiveResources && elapsedTime < cMinDelayBeforeLiveDecodedPrune)
return;
- if (current->decodedDataIsPurgeable()) {
- current = prev;
- continue;
- }
-
// Destroy our decoded data. This will remove us from
// m_liveDecodedResources, and possibly move us to a different LRU
// list in m_allResources.
Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (176109 => 176110)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2014-11-14 01:07:48 UTC (rev 176109)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2014-11-14 01:15:34 UTC (rev 176110)
@@ -132,11 +132,6 @@
const unsigned largeAnimationCutoff = 5242880;
#endif
- // If decoded data is purgeable, the operating system will
- // take care of throwing it away when the system is under pressure.
- if (decodedDataIsPurgeable())
- return;
-
// If we have decoded frames but there is no encoded data, we shouldn't destroy
// the decoded image since we won't be able to reconstruct it later.
if (!data() && m_frames.size())
Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.h (176109 => 176110)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.h 2014-11-14 01:07:48 UTC (rev 176109)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.h 2014-11-14 01:15:34 UTC (rev 176110)
@@ -283,15 +283,6 @@
#endif
private:
- virtual bool decodedDataIsPurgeable() const override
- {
-#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
- return true;
-#else
- return false;
-#endif
- }
-
ImageSource m_source;
mutable IntSize m_size; // The size to use for the overall image (will just be the size of the first image).
mutable IntSize m_sizeRespectingOrientation;
Modified: trunk/Source/WebCore/platform/graphics/Image.h (176109 => 176110)
--- trunk/Source/WebCore/platform/graphics/Image.h 2014-11-14 01:07:48 UTC (rev 176109)
+++ trunk/Source/WebCore/platform/graphics/Image.h 2014-11-14 01:15:34 UTC (rev 176110)
@@ -114,7 +114,6 @@
virtual String filenameExtension() const { return String(); } // null string if unknown
virtual void destroyDecodedData(bool destroyAll = true) = 0;
- virtual bool decodedDataIsPurgeable() const { return false; }
SharedBuffer* data() { return m_encodedImageData.get(); }
Modified: trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp (176109 => 176110)
--- trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp 2014-11-14 01:07:48 UTC (rev 176109)
+++ trunk/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp 2014-11-14 01:15:34 UTC (rev 176110)
@@ -50,16 +50,6 @@
const CFStringRef kCGImageSourceSubsampleFactor = CFSTR("kCGImageSourceSubsampleFactor");
#endif
-#if __has_include(<CoreGraphics/CGImagePrivate.h>)
-#import <CoreGraphics/CGImagePrivate.h>
-#else
-enum {
- kCGImageCachingTransient = 1,
- kCGImageCachingTemporary __CG_DEPRECATED_ENUMERATOR = 3
-};
-typedef uint32_t CGImageCachingFlags;
-#endif
-
namespace WebCore {
const CFStringRef WebCoreCGImagePropertyAPNGUnclampedDelayTime = CFSTR("UnclampedDelayTime");
@@ -353,7 +343,7 @@
CGImageRef ImageSource::createFrameAtIndex(size_t index, SubsamplingLevel subsamplingLevel)
{
if (!initialized())
- return nullptr;
+ return 0;
RetainPtr<CGImageRef> image = adoptCF(CGImageSourceCreateImageAtIndex(m_decoder, index, imageSourceOptions(subsamplingLevel).get()));
@@ -374,19 +364,8 @@
CFStringRef imageUTI = CGImageSourceGetType(m_decoder);
static const CFStringRef xbmUTI = CFSTR("public.xbitmap-image");
-
- if (!imageUTI)
+ if (!imageUTI || !CFEqual(imageUTI, xbmUTI))
return image.leakRef();
-
-#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
- if (CFEqual(imageUTI, kUTTypeGIF)) {
- CGImageSetCachingFlags(image.get(), kCGImageCachingTransient);
- return image.leakRef();
- }
-#endif
-
- if (!CFEqual(imageUTI, xbmUTI))
- return image.leakRef();
// If it is an xbm image, mask out all the white areas to render them transparent.
const CGFloat maskingColors[6] = {255, 255, 255, 255, 255, 255};