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

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

Issue 19393004: Allow eviction of ImageBitmaps that are created from ImageElements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix for assertion failure. Created 7 years, 4 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
« no previous file with comments | « Source/core/loader/cache/MockCachedImageClient.h ('k') | Source/core/loader/cache/Resource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/cache/Resource.h
diff --git a/Source/core/loader/cache/Resource.h b/Source/core/loader/cache/Resource.h
index 52516a67760c6cf3e9427d3ad8e4e176132a6f29..8f241ff3648b57c8085a018c04ad3073331c9cce 100644
--- a/Source/core/loader/cache/Resource.h
+++ b/Source/core/loader/cache/Resource.h
@@ -84,6 +84,13 @@ public:
Resource(const ResourceRequest&, Type);
virtual ~Resource();
+ // Determines the order in which CachedResources are evicted
+ // from the decoded resources cache.
+ enum CacheLiveResourcePriority {
+ CacheLiveResourcePriorityLow = 0,
+ CacheLiveResourcePriorityHigh
+ };
+
virtual void load(ResourceFetcher*, const ResourceLoaderOptions&);
virtual void setEncoding(const String&) { }
@@ -168,6 +175,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();
@@ -311,7 +320,7 @@ private:
unsigned m_preloadCount;
unsigned m_preloadResult : 2; // PreloadResult
-
+ unsigned m_cacheLiveResourcePriority : 2; // CacheLiveResourcePriority
unsigned m_inLiveDecodedResourcesList : 1;
unsigned m_requestedFromNetworkingLayer : 1;
« no previous file with comments | « Source/core/loader/cache/MockCachedImageClient.h ('k') | Source/core/loader/cache/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698