diff options
author | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-20 00:00:11 +0000 |
---|---|---|
committer | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-20 00:00:11 +0000 |
commit | 7a4bac579ce79352fab85658be16958e5b6a3d3a (patch) | |
tree | cfb5344a432d25c30ba3bf5363c34db472b4a879 | |
parent | f7c10a70ab9bb48b280be65da4bfc520cf32f910 (diff) | |
download | chromium_src-7a4bac579ce79352fab85658be16958e5b6a3d3a.zip chromium_src-7a4bac579ce79352fab85658be16958e5b6a3d3a.tar.gz chromium_src-7a4bac579ce79352fab85658be16958e5b6a3d3a.tar.bz2 |
Call ManageTiles() in SetVisible(false).
When a tab goes invisible, the memory policy is changed, but we may
never have any opportunity to apply it, since tile management is tied to
draws and timer ticks. Fix this with an explicit ManageTiles call.
NOTRY=true
BUG=273378
Patch by aelias@
https://codereview.chromium.org/23064013/
git-svn-id: svn://svn.chromium.org/chrome/branches/1547/src@218367 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/trees/layer_tree_host_impl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index 39fa2f3..be5e87d 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -1410,6 +1410,11 @@ void LayerTreeHostImpl::SetVisible(bool visible) { DidVisibilityChange(this, visible_); EnforceManagedMemoryPolicy(ActualManagedMemoryPolicy()); + // Evict tiles immediately if invisible since this tab may never get another + // draw or timer tick. + if (!visible_) + ManageTiles(); + if (!renderer_) return; |