Skip to content

Commit

Permalink
[cc] Move root layer pointer to LayerTreeImpl
Browse files Browse the repository at this point in the history
This is the first of a series of patches to move tree-specific state from
LayerTreeHostImpl to LayerTreeImpl. The LayerTreeHostImpl has always been
imagined to be a "View" aka LayerTreeView(Impl) and will keep ahold of stuff
that is view-specific.  The LayerTreeImpl, in constrast, will store state that
is specific to a specific tree version.

BUG=155209
R=enne


Review URL: https://chromiumcodereview.appspot.com/11450015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171593 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
nduca@chromium.org committed Dec 6, 2012
1 parent de0d0f4 commit 3b31c6a
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 138 deletions.
2 changes: 2 additions & 0 deletions cc/cc.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
'layer_tree_host_common.h',
'layer_tree_host_impl.cc',
'layer_tree_host_impl.h',
'layer_tree_impl.cc',
'layer_tree_impl.h',
'layer_updater.cc',
'layer_updater.h',
'managed_memory_policy.cc',
Expand Down
6 changes: 3 additions & 3 deletions cc/layer_tree_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,16 +383,16 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl)
m_needsFullTreeSync = false;

if (m_rootLayer && m_hudLayer)
hostImpl->setHudLayer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeHostCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->id())));
hostImpl->activeTree()->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>(LayerTreeHostCommon::findLayerInSubtree(hostImpl->rootLayer(), m_hudLayer->id())));
else
hostImpl->setHudLayer(0);
hostImpl->activeTree()->set_hud_layer(0);

// We may have added an animation during the tree sync. This will cause both layer tree hosts
// to visit their controllers.
if (rootLayer() && m_needsAnimateLayers)
hostImpl->setNeedsAnimateLayers();

hostImpl->setSourceFrameNumber(commitNumber());
hostImpl->activeTree()->set_source_frame_number(commitNumber());
hostImpl->setViewportSize(layoutViewportSize(), deviceViewportSize());
hostImpl->setDeviceScaleFactor(deviceScaleFactor());
hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFactor, m_maxPageScaleFactor);
Expand Down
Loading

0 comments on commit 3b31c6a

Please sign in to comment.