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

Unified Diff: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp

Issue 10025037: Merge 114191 - [chromium] Remove viewport memory restrictions (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/TextureManager.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (revision 114633)
+++ Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (working copy)
@@ -199,7 +199,7 @@
ASSERT(CCProxy::isImplThread());
TRACE_EVENT("CCLayerTreeHost::commitTo", this, 0);
- m_contentsTextureManager->reduceMemoryToLimit(TextureManager::reclaimLimitBytes(viewportSize()));
+ m_contentsTextureManager->reduceMemoryToLimit(m_contentsTextureManager->preferredMemoryLimitBytes());
m_contentsTextureManager->deleteEvictedTextures(hostImpl->contentsTextureAllocator());
}
@@ -367,7 +367,8 @@
m_visible = visible;
if (!visible && m_layerRendererInitialized) {
- m_contentsTextureManager->reduceMemoryToLimit(TextureManager::lowLimitBytes(viewportSize()));
+ // Drop all unprotected textures.
+ m_contentsTextureManager->reduceMemoryToLimit(0);
m_contentsTextureManager->unprotectAllTextures();
}
@@ -386,7 +387,7 @@
if (m_proxy->layerRendererCapabilities().contextHasCachedFrontBuffer)
contentsTextureManager()->evictAndDeleteAllTextures(hostImpl->contentsTextureAllocator());
else {
- contentsTextureManager()->reduceMemoryToLimit(TextureManager::reclaimLimitBytes(viewportSize()));
+ contentsTextureManager()->reduceMemoryToLimit(m_contentsTextureManager->preferredMemoryLimitBytes());
contentsTextureManager()->deleteEvictedTextures(hostImpl->contentsTextureAllocator());
}
@@ -488,8 +489,8 @@
if (!m_triggerIdlePaints)
return;
- size_t preferredLimitBytes = TextureManager::reclaimLimitBytes(m_viewportSize);
- size_t maxLimitBytes = TextureManager::highLimitBytes(m_viewportSize);
+ size_t preferredLimitBytes = m_contentsTextureManager->preferredMemoryLimitBytes();
+ size_t maxLimitBytes = m_contentsTextureManager->maxMemoryLimitBytes();
m_contentsTextureManager->reduceMemoryToLimit(preferredLimitBytes);
if (m_contentsTextureManager->currentMemoryUseBytes() >= preferredLimitBytes)
return;
« no previous file with comments | « Source/WebCore/platform/graphics/chromium/TextureManager.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698