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

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: 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 e78d90364d3f16c1314c4fe448b17308a075e32b..03a7d8b7deca96ebba6dc5d3da8b39f5da3581ad 100644
--- a/Source/core/loader/cache/CachedResource.h
+++ b/Source/core/loader/cache/CachedResource.h
@@ -80,7 +80,13 @@ public:
DecodeError
};
- CachedResource(const ResourceRequest&, Type);
+ enum DecodeCachePriority {
Justin Novosad 2013/07/19 21:09:53 I'd call this just Priority.
+ DecodeCachePriorityLow = 0,
+ DecodeCachePriorityMedium,
+ DecodeCachePriorityHigh
+ };
+
+ CachedResource(const ResourceRequest&, Type, DecodeCachePriority = DecodeCachePriorityMedium);
virtual ~CachedResource();
virtual void load(CachedResourceLoader*, const ResourceLoaderOptions&);
@@ -169,6 +175,8 @@ public:
void setInCache(bool inCache) { m_inCache = inCache; }
bool inCache() const { return m_inCache; }
+ void setDecodeCachePriority(DecodeCachePriority priority) { m_decodeCachePriority = priority; }
+ DecodeCachePriority decodeCachePriority() { return m_decodeCachePriority; }
bool inLiveDecodedResourcesList() { return m_inLiveDecodedResourcesList; }
void clearLoader();
@@ -317,6 +325,7 @@ private:
unsigned m_preloadResult : 2; // PreloadResult
+ DecodeCachePriority m_decodeCachePriority;
Justin Novosad 2013/07/19 21:09:53 Put ": 2" at the end.
bool m_inLiveDecodedResourcesList : 1;
bool m_requestedFromNetworkingLayer : 1;

Powered by Google App Engine
This is Rietveld 408576698