Title: [160943] trunk/Source/WebCore
- Revision
- 160943
- Author
- timothy_hor...@apple.com
- Date
- 2013-12-20 16:26:49 -0800 (Fri, 20 Dec 2013)
Log Message
Revert r160327, r160273, and r160260.
We'll come up with something less aggressive, as this doesn't quite work.
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (160942 => 160943)
--- trunk/Source/WebCore/ChangeLog 2013-12-21 00:12:39 UTC (rev 160942)
+++ trunk/Source/WebCore/ChangeLog 2013-12-21 00:26:49 UTC (rev 160943)
@@ -1,3 +1,18 @@
+2013-12-20 Tim Horton <timothy_hor...@apple.com>
+
+ Revert r160327, r160273, and r160260.
+
+ We'll come up with something less aggressive, as this doesn't quite work.
+
+ * loader/cache/CachedImage.h:
+ * loader/cache/CachedResource.h:
+ * loader/cache/MemoryCache.cpp:
+ (WebCore::MemoryCache::pruneLiveResourcesToSize):
+ * platform/graphics/BitmapImage.cpp:
+ (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
+ * platform/graphics/BitmapImage.h:
+ * platform/graphics/Image.h:
+
2013-12-20 Anders Carlsson <ander...@apple.com>
PostAttachCallbackDisabler should take a Document
Modified: trunk/Source/WebCore/loader/cache/CachedImage.h (160942 => 160943)
--- trunk/Source/WebCore/loader/cache/CachedImage.h 2013-12-21 00:12:39 UTC (rev 160942)
+++ trunk/Source/WebCore/loader/cache/CachedImage.h 2013-12-21 00:26:49 UTC (rev 160943)
@@ -24,7 +24,6 @@
#define CachedImage_h
#include "CachedResource.h"
-#include "Image.h"
#include "ImageObserver.h"
#include "IntRect.h"
#include "IntSizeHash.h"
@@ -126,8 +125,6 @@
virtual bool isImage() const OVERRIDE { return true; }
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 (160942 => 160943)
--- trunk/Source/WebCore/loader/cache/CachedResource.h 2013-12-21 00:12:39 UTC (rev 160942)
+++ trunk/Source/WebCore/loader/cache/CachedResource.h 2013-12-21 00:26:49 UTC (rev 160943)
@@ -149,8 +149,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 (160942 => 160943)
--- trunk/Source/WebCore/loader/cache/MemoryCache.cpp 2013-12-21 00:12:39 UTC (rev 160942)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.cpp 2013-12-21 00:26:49 UTC (rev 160943)
@@ -325,11 +325,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 (160942 => 160943)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2013-12-21 00:12:39 UTC (rev 160942)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2013-12-21 00:26:49 UTC (rev 160943)
@@ -102,11 +102,6 @@
// to one frame at a time.
static const unsigned cLargeAnimationCutoff = 5242880;
- // 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 (160942 => 160943)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.h 2013-12-21 00:12:39 UTC (rev 160942)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.h 2013-12-21 00:26:49 UTC (rev 160943)
@@ -262,15 +262,6 @@
#endif
private:
- virtual bool decodedDataIsPurgeable() const OVERRIDE
- {
-#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- 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 (160942 => 160943)
--- trunk/Source/WebCore/platform/graphics/Image.h 2013-12-21 00:12:39 UTC (rev 160942)
+++ trunk/Source/WebCore/platform/graphics/Image.h 2013-12-21 00:26:49 UTC (rev 160943)
@@ -124,7 +124,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(); }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes