summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 20:19:18 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-24 20:19:18 +0000
commit75deb740d5f7749a7b82dbf46767bc6b60b41401 (patch)
treea426bb15ffa1c4ae205bc9204e6922f471088219 /cc
parent833f6f330a38bdde0d8ee80513cd68ecc9b989a0 (diff)
downloadchromium_src-75deb740d5f7749a7b82dbf46767bc6b60b41401.zip
chromium_src-75deb740d5f7749a7b82dbf46767bc6b60b41401.tar.gz
chromium_src-75deb740d5f7749a7b82dbf46767bc6b60b41401.tar.bz2
cc: Fix incorrect LTHI shutdown logic
Landing this fix for enne@. Original description by enne@: It's possible that if there has never been an activation (implying no root layer on the active tree), then the trees will not be cleared during LayerTreeHostImpl's destructor. Given the comment in the destructor about animation, this seems to be problematic enough. Issue 251722 is about a case where the tile manager tries to activate the tree during its destruction but because the trees haven't been cleared yet, it thinks this is a supported operation. This is fixed by always destroying the trees in the destructor. BUG=251722 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/16983013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/trees/layer_tree_host_impl.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 4fe0871..316aeeb 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -227,15 +227,13 @@ LayerTreeHostImpl::~LayerTreeHostImpl() {
input_handler_client_ = NULL;
}
- if (active_tree_->root_layer()) {
- ClearRenderSurfaces();
- // The layer trees must be destroyed before the layer tree host. We've
- // made a contract with our animation controllers that the registrar
- // will outlive them, and we must make good.
- recycle_tree_.reset();
- pending_tree_.reset();
- active_tree_.reset();
- }
+ ClearRenderSurfaces();
+ // The layer trees must be destroyed before the layer tree host. We've
+ // made a contract with our animation controllers that the registrar
+ // will outlive them, and we must make good.
+ recycle_tree_.reset();
+ pending_tree_.reset();
+ active_tree_.reset();
}
void LayerTreeHostImpl::BeginCommit() {}