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

Unified Diff: cc/CCPrioritizedTextureManager.cpp

Issue 10947017: Enable removing uploads to evicted textures from texture upload queues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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: cc/CCPrioritizedTextureManager.cpp
diff --git a/cc/CCPrioritizedTextureManager.cpp b/cc/CCPrioritizedTextureManager.cpp
index d571e5f08532ddc8881a418940bd6144e62f90b1..85e8331e0923e210511418fa9fbb5c2de8463c35 100644
--- a/cc/CCPrioritizedTextureManager.cpp
+++ b/cc/CCPrioritizedTextureManager.cpp
@@ -265,11 +265,6 @@ void CCPrioritizedTextureManager::reduceMemoryOnImplThread(size_t limitBytes, CC
ASSERT(resourceProvider);
evictBackingsToReduceMemory(limitBytes, DoNotRespectManagerPriorityCutoff, resourceProvider);
-
- // Deleting just some (not all) resources is not supported yet because we do not clear
- // only the deleted resources from the texture upload queues (rather, we clear all uploads).
- // Make sure that if we evict all resources.
- ASSERT(m_backings.isEmpty());
}
void CCPrioritizedTextureManager::getEvictedBackings(BackingVector& evictedBackings)
@@ -358,8 +353,7 @@ void CCPrioritizedTextureManager::evictBackingResource(CCPrioritizedTexture::Bac
ASSERT(resourceProvider);
ASSERT(m_backings.find(backing) != m_backings.end());
- resourceProvider->deleteResource(backing->id());
- backing->setId(0);
+ backing->deleteResource(resourceProvider);
m_memoryUseBytes -= backing->bytes();
m_backings.remove(backing);
m_evictedBackings.append(backing);

Powered by Google App Engine
This is Rietveld 408576698