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

Unified Diff: cc/CCPrioritizedTexture.cpp

Issue 11048004: Only recycle and evict textures not in-use on the impl thread. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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 | « cc/CCLayerTreeHost.cpp ('k') | cc/CCPrioritizedTextureManager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCPrioritizedTexture.cpp
diff --git a/cc/CCPrioritizedTexture.cpp b/cc/CCPrioritizedTexture.cpp
index 2940e925227420bcf189cb22b1b853115003d336..f1d0539faaf9d28d0fa167d465fb62fb3462be99 100644
--- a/cc/CCPrioritizedTexture.cpp
+++ b/cc/CCPrioritizedTexture.cpp
@@ -83,7 +83,9 @@ void CCPrioritizedTexture::acquireBackingTexture(CCResourceProvider* resourcePro
CCResourceProvider::ResourceId CCPrioritizedTexture::resourceId() const
{
- if (m_backing)
+ // We want to save some memory to safely recycle. So don't push all textures to the impl side.
+ // FIXME: We should push even less memory than the priority cut-off so long as it isn't visible.
+ if (m_backing && m_backing->wasAbovePriorityCutoffAtLastPriorityUpdate())
return m_backing->id();
return 0;
}
« no previous file with comments | « cc/CCLayerTreeHost.cpp ('k') | cc/CCPrioritizedTextureManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698