| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/draw_property_utils.h" | 5 #include "cc/trees/draw_property_utils.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 void FindLayersThatNeedUpdates(LayerImpl* layer, | 397 void FindLayersThatNeedUpdates(LayerImpl* layer, |
| 398 const TransformTree& transform_tree, | 398 const TransformTree& transform_tree, |
| 399 const EffectTree& effect_tree, | 399 const EffectTree& effect_tree, |
| 400 LayerImplList* update_layer_list, | 400 LayerImplList* update_layer_list, |
| 401 std::vector<LayerImpl*>* visible_layer_list) { | 401 std::vector<LayerImpl*>* visible_layer_list) { |
| 402 DCHECK_GE(layer->effect_tree_index(), 0); | 402 DCHECK_GE(layer->effect_tree_index(), 0); |
| 403 for (auto* layer_impl : *layer->layer_tree_impl()) { | 403 for (auto* layer_impl : *layer->layer_tree_impl()) { |
| 404 bool layer_is_drawn = | 404 bool layer_is_drawn = |
| 405 effect_tree.Node(layer->effect_tree_index())->data.is_drawn; | 405 effect_tree.Node(layer->effect_tree_index())->data.is_drawn; |
| 406 | 406 |
| 407 if (layer_impl->parent() && | 407 if (!IsRootLayer(layer_impl) && |
| 408 LayerShouldBeSkipped(layer_impl, layer_is_drawn, transform_tree)) | 408 LayerShouldBeSkipped(layer_impl, layer_is_drawn, transform_tree)) |
| 409 continue; | 409 continue; |
| 410 | 410 |
| 411 if (LayerNeedsUpdate(layer_impl, layer_is_drawn, transform_tree)) { | 411 if (LayerNeedsUpdate(layer_impl, layer_is_drawn, transform_tree)) { |
| 412 visible_layer_list->push_back(layer_impl); | 412 visible_layer_list->push_back(layer_impl); |
| 413 update_layer_list->push_back(layer_impl); | 413 update_layer_list->push_back(layer_impl); |
| 414 } | 414 } |
| 415 | 415 |
| 416 if (LayerImpl* mask_layer = layer->mask_layer()) | 416 if (LayerImpl* mask_layer = layer->mask_layer()) |
| 417 update_layer_list->push_back(mask_layer); | 417 update_layer_list->push_back(mask_layer); |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 void UpdateElasticOverscroll(PropertyTrees* property_trees, | 1165 void UpdateElasticOverscroll(PropertyTrees* property_trees, |
| 1166 const Layer* overscroll_elasticity_layer, | 1166 const Layer* overscroll_elasticity_layer, |
| 1167 const gfx::Vector2dF& elastic_overscroll) { | 1167 const gfx::Vector2dF& elastic_overscroll) { |
| 1168 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, | 1168 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, |
| 1169 elastic_overscroll); | 1169 elastic_overscroll); |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 } // namespace draw_property_utils | 1172 } // namespace draw_property_utils |
| 1173 | 1173 |
| 1174 } // namespace cc | 1174 } // namespace cc |
| OLD | NEW |