diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-19 04:58:01 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-19 04:58:01 +0000 |
commit | 69b50ec5726f719bdb941254f96a37605833dd56 (patch) | |
tree | 713bf001a850a8a6d8c5003ae991f12b7f504819 /cc/layer_tree_host.cc | |
parent | 2ad7f1b00baeb0805aa5d87692e11230edbeaf74 (diff) | |
download | chromium_src-69b50ec5726f719bdb941254f96a37605833dd56.zip chromium_src-69b50ec5726f719bdb941254f96a37605833dd56.tar.gz chromium_src-69b50ec5726f719bdb941254f96a37605833dd56.tar.bz2 |
Find root scroll layer at tree activation
This finds the root scroll layer when a LayerTreeImpl is activated since we can
only interact with the active tree. Doing this allows adding more checks for
proper use and cuts down on the number of functions that have to be called in a
specific order.
I've also tightened up the TopControlsManagerClient interface, since previously
the interface defined "virtual LayerTreeImpl* activeTree()" but LayerTreeHostImpl
also defined a non-virtual "const LayerTreeImpl* activeTree() const" so depending
on the constness of a pointer callers would get one or the other. Turns out the
top controls system doesn't need the active tree, it just needs the root scroll
layer. It actually doesn't even need the full layer, it just needs to know if
there is a layer and if so what the y offset is.
BUG=169143
Review URL: https://chromiumcodereview.appspot.com/12025031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177847 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_tree_host.cc')
-rw-r--r-- | cc/layer_tree_host.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc index 62f3995..c237d1a 100644 --- a/cc/layer_tree_host.cc +++ b/cc/layer_tree_host.cc @@ -285,7 +285,6 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl) TRACE_EVENT0("cc", "LayerTreeHost::pushProperties"); TreeSynchronizer::pushProperties(rootLayer(), syncTree->RootLayer()); } - syncTree->FindRootScrollLayer(); m_needsFullTreeSync = false; @@ -298,6 +297,8 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl) syncTree->set_background_color(m_backgroundColor); syncTree->set_has_transparent_background(m_hasTransparentBackground); + syncTree->FindRootScrollLayer(); + if (!m_settings.implSidePainting) { // If we're not in impl-side painting, the tree is immediately // considered active. |