Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 1736073002: cc: Move SyncedScrollOffset to scroll tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix after rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 inner_scroll->bounds_delta()); 314 inner_scroll->bounds_delta());
315 } 315 }
316 316
317 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { 317 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
318 // The request queue should have been processed and does not require a push. 318 // The request queue should have been processed and does not require a push.
319 DCHECK_EQ(ui_resource_request_queue_.size(), 0u); 319 DCHECK_EQ(ui_resource_request_queue_.size(), 0u);
320 320
321 LayerImpl* layer = target_tree->CurrentlyScrollingLayer(); 321 LayerImpl* layer = target_tree->CurrentlyScrollingLayer();
322 target_tree->SetPropertyTrees(property_trees_); 322 target_tree->SetPropertyTrees(property_trees_);
323 target_tree->SetCurrentlyScrollingLayer(layer); 323 target_tree->SetCurrentlyScrollingLayer(layer);
324 target_tree->UpdatePropertyTreeScrollOffset(&property_trees_);
324 325
325 if (next_activation_forces_redraw_) { 326 if (next_activation_forces_redraw_) {
326 target_tree->ForceRedrawNextActivation(); 327 target_tree->ForceRedrawNextActivation();
327 next_activation_forces_redraw_ = false; 328 next_activation_forces_redraw_ = false;
328 } 329 }
329 330
330 target_tree->PassSwapPromises(&swap_promise_list_); 331 target_tree->PassSwapPromises(&swap_promise_list_);
331 332
332 target_tree->set_top_controls_shrink_blink_size( 333 target_tree->set_top_controls_shrink_blink_size(
333 top_controls_shrink_blink_size_); 334 top_controls_shrink_blink_size_);
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 void LayerTreeImpl::ApplySentScrollAndScaleDeltasFromAbortedCommit() { 622 void LayerTreeImpl::ApplySentScrollAndScaleDeltasFromAbortedCommit() {
622 DCHECK(IsActiveTree()); 623 DCHECK(IsActiveTree());
623 624
624 page_scale_factor()->AbortCommit(); 625 page_scale_factor()->AbortCommit();
625 top_controls_shown_ratio()->AbortCommit(); 626 top_controls_shown_ratio()->AbortCommit();
626 elastic_overscroll()->AbortCommit(); 627 elastic_overscroll()->AbortCommit();
627 628
628 if (!root_layer()) 629 if (!root_layer())
629 return; 630 return;
630 631
631 LayerTreeHostCommon::CallFunctionForSubtree( 632 property_trees()->scroll_tree.ApplySentScrollDeltasFromAbortedCommit();
632 root_layer(), [](LayerImpl* layer) {
633 layer->ApplySentScrollDeltasFromAbortedCommit();
634 });
635 } 633 }
636 634
637 void LayerTreeImpl::SetViewportLayersFromIds( 635 void LayerTreeImpl::SetViewportLayersFromIds(
638 int overscroll_elasticity_layer_id, 636 int overscroll_elasticity_layer_id,
639 int page_scale_layer_id, 637 int page_scale_layer_id,
640 int inner_viewport_scroll_layer_id, 638 int inner_viewport_scroll_layer_id,
641 int outer_viewport_scroll_layer_id) { 639 int outer_viewport_scroll_layer_id) {
642 overscroll_elasticity_layer_id_ = overscroll_elasticity_layer_id; 640 overscroll_elasticity_layer_id_ = overscroll_elasticity_layer_id;
643 page_scale_layer_id_ = page_scale_layer_id; 641 page_scale_layer_id_ = page_scale_layer_id;
644 inner_viewport_scroll_layer_id_ = inner_viewport_scroll_layer_id; 642 inner_viewport_scroll_layer_id_ = inner_viewport_scroll_layer_id;
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1958 const gfx::BoxF& box, 1956 const gfx::BoxF& box,
1959 gfx::BoxF* bounds) const { 1957 gfx::BoxF* bounds) const {
1960 *bounds = gfx::BoxF(); 1958 *bounds = gfx::BoxF();
1961 return layer_tree_host_impl_->animation_host() 1959 return layer_tree_host_impl_->animation_host()
1962 ? layer_tree_host_impl_->animation_host() 1960 ? layer_tree_host_impl_->animation_host()
1963 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) 1961 ->TransformAnimationBoundsForBox(layer->id(), box, bounds)
1964 : true; 1962 : true;
1965 } 1963 }
1966 1964
1967 } // namespace cc 1965 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698