Index: cc/trees/layer_tree_impl.cc |
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc |
index 58f8630ad133b3baaaf8da4be7afd77e60efcd2e..c272755eb7572ad9194ed88fe151a5e730dc6f1c 100644 |
--- a/cc/trees/layer_tree_impl.cc |
+++ b/cc/trees/layer_tree_impl.cc |
@@ -262,7 +262,7 @@ void LayerTreeImpl::UpdateScrollbars(int scroll_layer_id, int clip_layer_id) { |
scrollbar->SetScrollLayerLength(scroll_size.height()); |
} |
scrollbar_needs_animation |= |
- scrollbar->SetVerticalAdjust(clip_layer->bounds_delta().y()); |
+ scrollbar->SetVerticalAdjust(clip_layer->ViewportBoundsDelta().y()); |
} |
scrollbar_needs_animation |= |
@@ -386,21 +386,6 @@ std::unique_ptr<OwnedLayerImplList> LayerTreeImpl::DetachLayers() { |
return ret; |
} |
-static void UpdateClipTreeForBoundsDeltaOnLayer(LayerImpl* layer, |
- ClipTree* clip_tree) { |
- if (layer && layer->masks_to_bounds()) { |
- ClipNode* clip_node = clip_tree->Node(layer->clip_tree_index()); |
- if (clip_node) { |
- DCHECK_EQ(layer->id(), clip_node->owning_layer_id); |
- gfx::SizeF bounds = gfx::SizeF(layer->bounds()); |
- if (clip_node->clip.size() != bounds) { |
- clip_node->clip.set_size(bounds); |
- clip_tree->set_needs_update(true); |
- } |
- } |
- } |
-} |
- |
void LayerTreeImpl::SetPropertyTrees(PropertyTrees* property_trees) { |
std::vector<std::unique_ptr<RenderSurfaceImpl>> old_render_surfaces; |
property_trees_.effect_tree.TakeRenderSurfaces(&old_render_surfaces); |
@@ -421,30 +406,6 @@ void LayerTreeImpl::SetPropertyTrees(PropertyTrees* property_trees) { |
property_trees_.effect_tree.set_needs_update(true); |
} |
-void LayerTreeImpl::UpdatePropertyTreesForBoundsDelta() { |
- DCHECK(IsActiveTree()); |
- LayerImpl* inner_container = InnerViewportContainerLayer(); |
- LayerImpl* outer_container = OuterViewportContainerLayer(); |
- LayerImpl* inner_scroll = InnerViewportScrollLayer(); |
- |
- UpdateClipTreeForBoundsDeltaOnLayer(inner_container, |
- &property_trees_.clip_tree); |
- UpdateClipTreeForBoundsDeltaOnLayer(InnerViewportScrollLayer(), |
- &property_trees_.clip_tree); |
- UpdateClipTreeForBoundsDeltaOnLayer(outer_container, |
- &property_trees_.clip_tree); |
- |
- if (inner_container) |
- property_trees_.SetInnerViewportContainerBoundsDelta( |
- inner_container->bounds_delta()); |
- if (outer_container) |
- property_trees_.SetOuterViewportContainerBoundsDelta( |
- outer_container->bounds_delta()); |
- if (inner_scroll) |
- property_trees_.SetInnerViewportScrollBoundsDelta( |
- inner_scroll->bounds_delta()); |
-} |
- |
void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { |
// The request queue should have been processed and does not require a push. |
DCHECK_EQ(ui_resource_request_queue_.size(), 0u); |
@@ -467,11 +428,6 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { |
target_tree->property_trees()->scroll_tree.PushScrollUpdatesFromPendingTree( |
&property_trees_, target_tree); |
- // This needs to be called early so that we don't clamp with incorrect max |
- // offsets when UpdateViewportContainerSizes is called from e.g. |
- // PushBrowserControls |
- target_tree->UpdatePropertyTreesForBoundsDelta(); |
- |
if (next_activation_forces_redraw_) { |
target_tree->ForceRedrawNextActivation(); |
next_activation_forces_redraw_ = false; |