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

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: Fix drawImage out of bounds src rect. 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..606813244f92c8c577a2bc1f4a6b2314cb89f413 100644
--- a/Source/core/loader/cache/CachedResource.h
+++ b/Source/core/loader/cache/CachedResource.h
@@ -80,6 +80,12 @@ public:
DecodeError
};
+ enum CachePriority {
+ CachePriorityLow = 0,
+ CachePriorityMedium,
+ CachePriorityHigh
+ };
+
CachedResource(const ResourceRequest&, Type);
virtual ~CachedResource();
@@ -167,6 +173,8 @@ public:
void setInCache(bool inCache) { m_inCache = inCache; }
bool inCache() const { return m_inCache; }
+ void setCachePriority(CachePriority);
+ unsigned cachePriority() const { return m_cachePriority; }
bool inLiveDecodedResourcesList() { return m_inLiveDecodedResourcesList; }
void clearLoader();
@@ -310,6 +318,7 @@ private:
unsigned m_preloadCount;
unsigned m_preloadResult : 2; // PreloadResult
+ unsigned m_cachePriority : 2; // CachePriority
bool m_inLiveDecodedResourcesList : 1;
bool m_requestedFromNetworkingLayer : 1;

Powered by Google App Engine
This is Rietveld 408576698