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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 property_trees_ = *property_trees; | 364 property_trees_ = *property_trees; |
365 bool render_surfaces_changed = | 365 bool render_surfaces_changed = |
366 property_trees_.effect_tree.CreateOrReuseRenderSurfaces( | 366 property_trees_.effect_tree.CreateOrReuseRenderSurfaces( |
367 &old_render_surfaces, this); | 367 &old_render_surfaces, this); |
368 if (render_surfaces_changed) | 368 if (render_surfaces_changed) |
369 set_needs_update_draw_properties(); | 369 set_needs_update_draw_properties(); |
370 property_trees->effect_tree.PushCopyRequestsTo(&property_trees_.effect_tree); | 370 property_trees->effect_tree.PushCopyRequestsTo(&property_trees_.effect_tree); |
371 property_trees_.is_main_thread = false; | 371 property_trees_.is_main_thread = false; |
372 property_trees_.is_active = IsActiveTree(); | 372 property_trees_.is_active = IsActiveTree(); |
373 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); | 373 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); |
374 // The value of some effect node properties (like is_drawn) depends on | |
375 // whether we are on the active tree or not. So, we need to update the | |
376 // effect tree. | |
377 if (IsActiveTree()) | |
378 property_trees_.effect_tree.set_needs_update(true); | |
379 } | 374 } |
380 | 375 |
381 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { | 376 void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) { |
382 // The request queue should have been processed and does not require a push. | 377 // The request queue should have been processed and does not require a push. |
383 DCHECK_EQ(ui_resource_request_queue_.size(), 0u); | 378 DCHECK_EQ(ui_resource_request_queue_.size(), 0u); |
384 | 379 |
385 // To maintain the current scrolling node we need to use element ids which | 380 // To maintain the current scrolling node we need to use element ids which |
386 // are stable across the property tree update in SetPropertyTrees. | 381 // are stable across the property tree update in SetPropertyTrees. |
387 ElementId scrolling_element_id; | 382 ElementId scrolling_element_id; |
388 if (ScrollNode* scrolling_node = target_tree->CurrentlyScrollingNode()) | 383 if (ScrollNode* scrolling_node = target_tree->CurrentlyScrollingNode()) |
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2120 | 2115 |
2121 void LayerTreeImpl::ResetAllChangeTracking() { | 2116 void LayerTreeImpl::ResetAllChangeTracking() { |
2122 layers_that_should_push_properties_.clear(); | 2117 layers_that_should_push_properties_.clear(); |
2123 // Iterate over all layers, including masks. | 2118 // Iterate over all layers, including masks. |
2124 for (auto& layer : *layers_) | 2119 for (auto& layer : *layers_) |
2125 layer->ResetChangeTracking(); | 2120 layer->ResetChangeTracking(); |
2126 property_trees_.ResetAllChangeTracking(); | 2121 property_trees_.ResetAllChangeTracking(); |
2127 } | 2122 } |
2128 | 2123 |
2129 } // namespace cc | 2124 } // namespace cc |
OLD | NEW |