summaryrefslogtreecommitdiffstats
path: root/cc/single_thread_proxy.cc
diff options
context:
space:
mode:
authorccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-22 22:50:28 +0000
committerccameron@chromium.org <ccameron@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-22 22:50:28 +0000
commita0a008420151bf3f117f294250e35641af25f213 (patch)
tree7cd0378a4d4b0570d1654a695b97c0957568aff6 /cc/single_thread_proxy.cc
parent6c12c50736a7f2cce5d8776c9d64b85e3435aec6 (diff)
downloadchromium_src-a0a008420151bf3f117f294250e35641af25f213.zip
chromium_src-a0a008420151bf3f117f294250e35641af25f213.tar.gz
chromium_src-a0a008420151bf3f117f294250e35641af25f213.tar.bz2
Conditionalize memory allocation limit based on visibility
Replace the single value with a ManagedMemoryPolicy structure which has the limit in bytes when visible and when not visible, and also has a priority cutoff when visible and when not visible. In CCRendererClient, separate the methods for specifying and enforcing a memory policy. This is so that one may decrease the consumption of a renderer that has grown over time, without disallowing growth in the future. BUG=134750 Review URL: https://chromiumcodereview.appspot.com/11196038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/single_thread_proxy.cc')
-rw-r--r--cc/single_thread_proxy.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc
index af9232f..d43606b 100644
--- a/cc/single_thread_proxy.cc
+++ b/cc/single_thread_proxy.cc
@@ -277,13 +277,13 @@ void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(scoped_ptr
m_layerTreeHost->setAnimationEvents(events.Pass(), wallClockTime);
}
-bool CCSingleThreadProxy::reduceContentsTextureMemoryOnImplThread(size_t limitBytes)
+bool CCSingleThreadProxy::reduceContentsTextureMemoryOnImplThread(size_t limitBytes, int priorityCutoff)
{
DCHECK(isImplThread());
if (!m_layerTreeHost->contentsTextureManager())
return false;
- return m_layerTreeHost->contentsTextureManager()->reduceMemoryOnImplThread(limitBytes, m_layerTreeHostImpl->resourceProvider());
+ return m_layerTreeHost->contentsTextureManager()->reduceMemoryOnImplThread(limitBytes, priorityCutoff, m_layerTreeHostImpl->resourceProvider());
}
// Called by the legacy scheduling path (e.g. where render_widget does the scheduling)