diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-24 23:44:16 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-24 23:44:16 +0000 |
commit | 615c78aeb480d892615f518c8ecacb590dcfe731 (patch) | |
tree | ae55aca4e1518e66a49c2f8684afc6abc70ecc83 /cc/layer_impl.cc | |
parent | bb8d4a5307c61a1dfdff49f9488dcd53f70e21b7 (diff) | |
download | chromium_src-615c78aeb480d892615f518c8ecacb590dcfe731.zip chromium_src-615c78aeb480d892615f518c8ecacb590dcfe731.tar.gz chromium_src-615c78aeb480d892615f518c8ecacb590dcfe731.tar.bz2 |
cc: Make updateDrawProperties tree-specific
Previously, setNeedsUpdateDrawProperties and updateDrawProperties applied
to both the pending tree and the active tree. For example, on frames
with a commit and an activation, there could be three
updateDrawProperties (two from the commit and one on the newly activated
active tree). There's no need for the extra active tree update on
commit.
Along with making the update tree-specific, this patch also splits out
when updateDrawProperties is called on each tree. The pending tree is
updated immediately post-commit (to create tilings) and then during each
tick that it tries to activate. The active tree (as before) is updated
immediately prior to drawing.
A number of redundant setNeedsUpdateDrawProperties calls were removed
from LayerTreeHostImpl, in favor of letting functions like
LayerTreeHostImpl::setScaleDelta and LayerImpl::setScrollDelta do it
themselves, as they are already doing.
R=danakj@chromium.org
BUG=171826
Review URL: https://chromiumcodereview.appspot.com/12040067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_impl.cc')
-rw-r--r-- | cc/layer_impl.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc index 467b023..2788c725 100644 --- a/cc/layer_impl.cc +++ b/cc/layer_impl.cc @@ -79,7 +79,7 @@ void LayerImpl::addChild(scoped_ptr<LayerImpl> child) child->setParent(this); DCHECK_EQ(layerTreeImpl(), child->layerTreeImpl()); m_children.push_back(child.Pass()); - layerTreeImpl()->SetNeedsUpdateDrawProperties(); + layerTreeImpl()->set_needs_update_draw_properties(); } LayerImpl* LayerImpl::childAt(size_t index) const @@ -94,7 +94,7 @@ scoped_ptr<LayerImpl> LayerImpl::removeChild(LayerImpl* child) if (*it == child) { scoped_ptr<LayerImpl> ret = m_children.take(it); m_children.erase(it); - layerTreeImpl()->SetNeedsUpdateDrawProperties(); + layerTreeImpl()->set_needs_update_draw_properties(); return ret.Pass(); } } @@ -104,7 +104,7 @@ scoped_ptr<LayerImpl> LayerImpl::removeChild(LayerImpl* child) void LayerImpl::removeAllChildren() { m_children.clear(); - layerTreeImpl()->SetNeedsUpdateDrawProperties(); + layerTreeImpl()->set_needs_update_draw_properties(); } void LayerImpl::clearChildList() @@ -113,7 +113,7 @@ void LayerImpl::clearChildList() return; m_children.clear(); - layerTreeImpl()->SetNeedsUpdateDrawProperties(); + layerTreeImpl()->set_needs_update_draw_properties(); } void LayerImpl::createRenderSurface() @@ -503,13 +503,13 @@ bool LayerImpl::layerSurfacePropertyChanged() const void LayerImpl::noteLayerSurfacePropertyChanged() { m_layerSurfacePropertyChanged = true; - layerTreeImpl()->SetNeedsUpdateDrawProperties(); + layerTreeImpl()->set_needs_update_draw_properties(); } void LayerImpl::noteLayerPropertyChanged() { m_layerPropertyChanged = true; - layerTreeImpl()->SetNeedsUpdateDrawProperties(); + layerTreeImpl()->set_needs_update_draw_properties(); } void LayerImpl::noteLayerPropertyChangedForSubtree() @@ -520,7 +520,7 @@ void LayerImpl::noteLayerPropertyChangedForSubtree() void LayerImpl::noteLayerPropertyChangedForDescendants() { - layerTreeImpl()->SetNeedsUpdateDrawProperties(); + layerTreeImpl()->set_needs_update_draw_properties(); for (size_t i = 0; i < m_children.size(); ++i) m_children[i]->noteLayerPropertyChangedForSubtree(); } @@ -916,7 +916,7 @@ void LayerImpl::setMaxScrollOffset(gfx::Vector2d maxScrollOffset) return; m_maxScrollOffset = maxScrollOffset; - layerTreeImpl()->SetNeedsUpdateDrawProperties(); + layerTreeImpl()->set_needs_update_draw_properties(); updateScrollbarPositions(); } |