| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CCPrioritizedTextureManager_h | 5 #ifndef CCPrioritizedTextureManager_h |
| 6 #define CCPrioritizedTextureManager_h | 6 #define CCPrioritizedTextureManager_h |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 } | 133 } |
| 134 | 134 |
| 135 CCPrioritizedTextureManager(size_t maxMemoryLimitBytes, int maxTextureSize,
int pool); | 135 CCPrioritizedTextureManager(size_t maxMemoryLimitBytes, int maxTextureSize,
int pool); |
| 136 | 136 |
| 137 void evictBackingsToReduceMemory(size_t limitBytes, EvictionPriorityPolicy,
CCResourceProvider*); | 137 void evictBackingsToReduceMemory(size_t limitBytes, EvictionPriorityPolicy,
CCResourceProvider*); |
| 138 CCPrioritizedTexture::Backing* createBacking(IntSize, GC3Denum format, CCRes
ourceProvider*); | 138 CCPrioritizedTexture::Backing* createBacking(IntSize, GC3Denum format, CCRes
ourceProvider*); |
| 139 void evictBackingResource(CCPrioritizedTexture::Backing*, CCResourceProvider
*); | 139 void evictBackingResource(CCPrioritizedTexture::Backing*, CCResourceProvider
*); |
| 140 void deleteUnlinkedEvictedBackings(); | 140 void deleteUnlinkedEvictedBackings(); |
| 141 void sortBackings(); | 141 void sortBackings(); |
| 142 | 142 |
| 143 #if CC_DCHECK_ENABLED() | 143 #if !ASSERT_DISABLED |
| 144 void assertInvariants(); | 144 void assertInvariants(); |
| 145 #endif | 145 #endif |
| 146 | 146 |
| 147 size_t m_maxMemoryLimitBytes; | 147 size_t m_maxMemoryLimitBytes; |
| 148 unsigned m_priorityCutoff; | 148 unsigned m_priorityCutoff; |
| 149 size_t m_memoryUseBytes; | 149 size_t m_memoryUseBytes; |
| 150 size_t m_memoryAboveCutoffBytes; | 150 size_t m_memoryAboveCutoffBytes; |
| 151 size_t m_memoryAvailableBytes; | 151 size_t m_memoryAvailableBytes; |
| 152 int m_pool; | 152 int m_pool; |
| 153 | 153 |
| 154 typedef base::hash_set<CCPrioritizedTexture*> TextureSet; | 154 typedef base::hash_set<CCPrioritizedTexture*> TextureSet; |
| 155 typedef ListHashSet<CCPrioritizedTexture::Backing*> BackingSet; | 155 typedef ListHashSet<CCPrioritizedTexture::Backing*> BackingSet; |
| 156 typedef Vector<CCPrioritizedTexture*> TextureVector; | 156 typedef Vector<CCPrioritizedTexture*> TextureVector; |
| 157 | 157 |
| 158 TextureSet m_textures; | 158 TextureSet m_textures; |
| 159 BackingSet m_backings; | 159 BackingSet m_backings; |
| 160 BackingVector m_evictedBackings; | 160 BackingVector m_evictedBackings; |
| 161 | 161 |
| 162 TextureVector m_tempTextureVector; | 162 TextureVector m_tempTextureVector; |
| 163 BackingVector m_tempBackingVector; | 163 BackingVector m_tempBackingVector; |
| 164 | 164 |
| 165 DISALLOW_COPY_AND_ASSIGN(CCPrioritizedTextureManager); | 165 DISALLOW_COPY_AND_ASSIGN(CCPrioritizedTextureManager); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace cc | 168 } // namespace cc |
| 169 | 169 |
| 170 #endif | 170 #endif |
| OLD | NEW |