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

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: Use CachedImage as the backing store for ImageBitmap. Implement O(1) decode cache. 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..a0cf2a1f945562316ba991c3fd0636ed46f7cbff 100644
--- a/Source/core/loader/cache/CachedResource.h
+++ b/Source/core/loader/cache/CachedResource.h
@@ -80,6 +80,12 @@ public:
DecodeError
};
+ enum DecodePriority {
Justin Novosad 2013/07/23 16:55:12 Hmmm... this name sounds like it determines which
+ DecodePriorityLow = 0,
+ DecodePriorityMedium,
+ DecodePriorityHigh
+ };
+
CachedResource(const ResourceRequest&, Type);
virtual ~CachedResource();
@@ -169,6 +175,8 @@ public:
void setInCache(bool inCache) { m_inCache = inCache; }
bool inCache() const { return m_inCache; }
+ void setDecodePriority(DecodePriority);
+ DecodePriority decodePriority() const { return m_decodePriority; }
bool inLiveDecodedResourcesList() { return m_inLiveDecodedResourcesList; }
void clearLoader();
@@ -317,6 +325,7 @@ private:
unsigned m_preloadResult : 2; // PreloadResult
+ DecodePriority m_decodePriority;
bool m_inLiveDecodedResourcesList : 1;
bool m_requestedFromNetworkingLayer : 1;

Powered by Google App Engine
This is Rietveld 408576698