Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1075)

Unified Diff: Source/core/loader/cache/CachedResource.h

Issue 19393004: Allow eviction of ImageBitmaps that are created from ImageElements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Name change. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/loader/cache/CachedResource.h
diff --git a/Source/core/loader/cache/CachedResource.h b/Source/core/loader/cache/CachedResource.h
index b9c6f778fcd40d7247d28aa2c579a2d346087cf5..7d1dba5fc3b77e0b281ab6b4aa5c35fb21c9637e 100644
--- a/Source/core/loader/cache/CachedResource.h
+++ b/Source/core/loader/cache/CachedResource.h
@@ -80,6 +80,13 @@ public:
DecodeError
};
+ // Determines the order in which CachedResources are evicted
+ // from the decoded resources cache.
+ enum CacheLiveResourcePriority {
+ CacheLiveResourcePriorityLow = 0,
+ CacheLiveResourcePriorityHigh
+ };
+
CachedResource(const ResourceRequest&, Type);
virtual ~CachedResource();
@@ -167,6 +174,8 @@ public:
void setInCache(bool inCache) { m_inCache = inCache; }
bool inCache() const { return m_inCache; }
+ void setCacheLiveResourcePriority(CacheLiveResourcePriority);
+ unsigned cacheLiveResourcePriority() const { return m_cacheLiveResourcePriority; }
bool inLiveDecodedResourcesList() { return m_inLiveDecodedResourcesList; }
void clearLoader();
@@ -310,6 +319,7 @@ private:
unsigned m_preloadCount;
unsigned m_preloadResult : 2; // PreloadResult
+ unsigned m_cacheLiveResourcePriority : 2; // CacheLiveResourcePriority
bool m_inLiveDecodedResourcesList : 1;
bool m_requestedFromNetworkingLayer : 1;

Powered by Google App Engine
This is Rietveld 408576698