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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 gfx::SizeF bounds = gfx::SizeF(layer->bounds()); | 372 gfx::SizeF bounds = gfx::SizeF(layer->bounds()); |
373 if (clip_node->clip.size() != bounds) { | 373 if (clip_node->clip.size() != bounds) { |
374 clip_node->clip.set_size(bounds); | 374 clip_node->clip.set_size(bounds); |
375 clip_tree->set_needs_update(true); | 375 clip_tree->set_needs_update(true); |
376 } | 376 } |
377 } | 377 } |
378 } | 378 } |
379 } | 379 } |
380 | 380 |
381 void LayerTreeImpl::SetPropertyTrees(PropertyTrees* property_trees) { | 381 void LayerTreeImpl::SetPropertyTrees(PropertyTrees* property_trees) { |
| 382 EffectTree::StableIdRenderSurfaceList stable_id_render_surface_list = |
| 383 property_trees_.effect_tree.CreateStableIdRenderSurfaceList(); |
382 property_trees_ = *property_trees; | 384 property_trees_ = *property_trees; |
| 385 property_trees_.effect_tree.UpdateRenderSurfaceEffectIds( |
| 386 stable_id_render_surface_list, this); |
383 property_trees->effect_tree.PushCopyRequestsTo(&property_trees_.effect_tree); | 387 property_trees->effect_tree.PushCopyRequestsTo(&property_trees_.effect_tree); |
384 property_trees_.is_main_thread = false; | 388 property_trees_.is_main_thread = false; |
385 property_trees_.is_active = IsActiveTree(); | 389 property_trees_.is_active = IsActiveTree(); |
386 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); | 390 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); |
387 // The value of some effect node properties (like is_drawn) depends on | 391 // The value of some effect node properties (like is_drawn) depends on |
388 // whether we are on the active tree or not. So, we need to update the | 392 // whether we are on the active tree or not. So, we need to update the |
389 // effect tree. | 393 // effect tree. |
390 if (IsActiveTree()) | 394 if (IsActiveTree()) |
391 property_trees_.effect_tree.set_needs_update(true); | 395 property_trees_.effect_tree.set_needs_update(true); |
392 } | 396 } |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 | 2084 |
2081 void LayerTreeImpl::ResetAllChangeTracking() { | 2085 void LayerTreeImpl::ResetAllChangeTracking() { |
2082 layers_that_should_push_properties_.clear(); | 2086 layers_that_should_push_properties_.clear(); |
2083 // Iterate over all layers, including masks. | 2087 // Iterate over all layers, including masks. |
2084 for (auto& layer : *layers_) | 2088 for (auto& layer : *layers_) |
2085 layer->ResetChangeTracking(); | 2089 layer->ResetChangeTracking(); |
2086 property_trees_.ResetAllChangeTracking(); | 2090 property_trees_.ResetAllChangeTracking(); |
2087 } | 2091 } |
2088 | 2092 |
2089 } // namespace cc | 2093 } // namespace cc |
OLD | NEW |