OLD | NEW |
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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 407 |
408 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { | 408 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { |
409 // The request queue should have been processed and does not require a push. | 409 // The request queue should have been processed and does not require a push. |
410 DCHECK_EQ(ui_resource_request_queue_.size(), 0u); | 410 DCHECK_EQ(ui_resource_request_queue_.size(), 0u); |
411 | 411 |
412 LayerImpl* layer = target_tree->CurrentlyScrollingLayer(); | 412 LayerImpl* layer = target_tree->CurrentlyScrollingLayer(); |
413 target_tree->SetPropertyTrees(&property_trees_); | 413 target_tree->SetPropertyTrees(&property_trees_); |
414 target_tree->SetCurrentlyScrollingLayer(layer); | 414 target_tree->SetCurrentlyScrollingLayer(layer); |
415 target_tree->UpdatePropertyTreeScrollOffset(&property_trees_); | 415 target_tree->UpdatePropertyTreeScrollOffset(&property_trees_); |
416 | 416 |
| 417 // This needs to be called early so that we don't clamp with incorrect max |
| 418 // offsets when UpdateViewportContainerSizes is called from e.g. |
| 419 // PushTopControls |
| 420 target_tree->UpdatePropertyTreesForBoundsDelta(); |
| 421 |
417 if (next_activation_forces_redraw_) { | 422 if (next_activation_forces_redraw_) { |
418 target_tree->ForceRedrawNextActivation(); | 423 target_tree->ForceRedrawNextActivation(); |
419 next_activation_forces_redraw_ = false; | 424 next_activation_forces_redraw_ = false; |
420 } | 425 } |
421 | 426 |
422 target_tree->PassSwapPromises(&swap_promise_list_); | 427 target_tree->PassSwapPromises(&swap_promise_list_); |
423 | 428 |
424 target_tree->set_top_controls_shrink_blink_size( | 429 target_tree->set_top_controls_shrink_blink_size( |
425 top_controls_shrink_blink_size_); | 430 top_controls_shrink_blink_size_); |
426 target_tree->set_top_controls_height(top_controls_height_); | 431 target_tree->set_top_controls_height(top_controls_height_); |
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1992 | 1997 |
1993 void LayerTreeImpl::ResetAllChangeTracking() { | 1998 void LayerTreeImpl::ResetAllChangeTracking() { |
1994 layers_that_should_push_properties_.clear(); | 1999 layers_that_should_push_properties_.clear(); |
1995 // Iterate over all layers, including masks and replicas. | 2000 // Iterate over all layers, including masks and replicas. |
1996 for (auto& layer : *layers_) | 2001 for (auto& layer : *layers_) |
1997 layer->ResetChangeTracking(); | 2002 layer->ResetChangeTracking(); |
1998 property_trees_.ResetAllChangeTracking(); | 2003 property_trees_.ResetAllChangeTracking(); |
1999 } | 2004 } |
2000 | 2005 |
2001 } // namespace cc | 2006 } // namespace cc |
OLD | NEW |