Index: cc/prioritized_texture_manager.h |
diff --git a/cc/prioritized_texture_manager.h b/cc/prioritized_texture_manager.h |
index e8998b03d93e6855226d59dbab63bbcdc86b5ab6..be64f087f72b346d75ca35e9c2add8e673f583f0 100644 |
--- a/cc/prioritized_texture_manager.h |
+++ b/cc/prioritized_texture_manager.h |
@@ -14,8 +14,8 @@ |
#include "GraphicsContext3D.h" |
#include "IntRect.h" |
#include "IntSize.h" |
-#include <wtf/ListHashSet.h> |
#include <wtf/Vector.h> |
+#include <list> |
#if defined(COMPILER_GCC) |
namespace BASE_HASH_NAMESPACE { |
@@ -136,13 +136,11 @@ private: |
void evictBackingsToReduceMemory(size_t limitBytes, EvictionPriorityPolicy, CCResourceProvider*); |
CCPrioritizedTexture::Backing* createBacking(IntSize, GC3Denum format, CCResourceProvider*); |
- void evictBackingResource(CCPrioritizedTexture::Backing*, CCResourceProvider*); |
+ void evictFirstBackingResource(CCPrioritizedTexture::Backing*, CCResourceProvider*); |
void deleteUnlinkedEvictedBackings(); |
void sortBackings(); |
-#if !ASSERT_DISABLED |
void assertInvariants(); |
-#endif |
size_t m_maxMemoryLimitBytes; |
unsigned m_priorityCutoff; |
@@ -152,15 +150,17 @@ private: |
int m_pool; |
typedef base::hash_set<CCPrioritizedTexture*> TextureSet; |
- typedef ListHashSet<CCPrioritizedTexture::Backing*> BackingSet; |
+ typedef std::list<CCPrioritizedTexture::Backing*> BackingList; |
typedef Vector<CCPrioritizedTexture*> TextureVector; |
TextureSet m_textures; |
- BackingSet m_backings; |
+ // This list is always sorted in eviction order, with the exception the |
+ // newly-allocated textures at the very end of the tail that are not |
+ // sorted by priority. |
+ BackingList m_backings; |
BackingVector m_evictedBackings; |
jamesr
2012/10/17 01:31:11
Does the m_evictedBackings need O(1) access or cou
ccameron
2012/10/17 02:13:58
Nah, it can be a list too. Updated.
|
TextureVector m_tempTextureVector; |
- BackingVector m_tempBackingVector; |
DISALLOW_COPY_AND_ASSIGN(CCPrioritizedTextureManager); |
}; |