| Index: cc/CCPrioritizedTextureManager.cpp
|
| diff --git a/cc/CCPrioritizedTextureManager.cpp b/cc/CCPrioritizedTextureManager.cpp
|
| index d571e5f08532ddc8881a418940bd6144e62f90b1..d70b3f0c1ea02715fdde6052762ff0549a794400 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)
|
| @@ -344,7 +339,7 @@ CCPrioritizedTexture::Backing* CCPrioritizedTextureManager::createBacking(IntSiz
|
| ASSERT(CCProxy::isImplThread() && CCProxy::isMainThreadBlocked());
|
| ASSERT(resourceProvider);
|
| CCResourceProvider::ResourceId resourceId = resourceProvider->createResource(m_pool, size, format, CCResourceProvider::TextureUsageAny);
|
| - CCPrioritizedTexture::Backing* backing = new CCPrioritizedTexture::Backing(resourceId, size, format);
|
| + CCPrioritizedTexture::Backing* backing = new CCPrioritizedTexture::Backing(resourceId, resourceProvider, size, format);
|
| m_memoryUseBytes += backing->bytes();
|
| // Put backing texture at the front for eviction, since it isn't in use yet.
|
| m_backings.insertBefore(m_backings.begin(), backing);
|
| @@ -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);
|
|
|