| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 template <typename LayerType> | 209 template <typename LayerType> |
| 210 void CalculateClipRects( | 210 void CalculateClipRects( |
| 211 const typename LayerType::LayerListType& visible_layer_list, | 211 const typename LayerType::LayerListType& visible_layer_list, |
| 212 const ClipTree& clip_tree, | 212 const ClipTree& clip_tree, |
| 213 const TransformTree& transform_tree, | 213 const TransformTree& transform_tree, |
| 214 const EffectTree& effect_tree, | 214 const EffectTree& effect_tree, |
| 215 bool non_root_surfaces_enabled) { | 215 bool non_root_surfaces_enabled) { |
| 216 for (auto& layer : visible_layer_list) { | 216 for (auto& layer : visible_layer_list) { |
| 217 const ClipNode* clip_node = clip_tree.Node(layer->clip_tree_index()); | 217 const ClipNode* clip_node = clip_tree.Node(layer->clip_tree_index()); |
| 218 // The entire layer is visible if it has copy requests. | |
| 219 const EffectNode* effect_node = | |
| 220 effect_tree.Node(layer->effect_tree_index()); | |
| 221 if (effect_node->data.has_copy_request && | |
| 222 effect_node->owner_id == layer->id()) | |
| 223 continue; | |
| 224 | |
| 225 if (!non_root_surfaces_enabled) { | 218 if (!non_root_surfaces_enabled) { |
| 226 layer->set_clip_rect( | 219 layer->set_clip_rect( |
| 227 gfx::ToEnclosingRect(clip_node->data.clip_in_target_space)); | 220 gfx::ToEnclosingRect(clip_node->data.clip_in_target_space)); |
| 228 continue; | 221 continue; |
| 229 } | 222 } |
| 230 | 223 |
| 231 // When both the layer and the target are unclipped, the entire layer | 224 // When both the layer and the target are unclipped, the entire layer |
| 232 // content rect is visible. | 225 // content rect is visible. |
| 233 const bool fully_visible = !clip_node->data.layers_are_clipped && | 226 const bool fully_visible = !clip_node->data.layers_are_clipped && |
| 234 !clip_node->data.target_is_clipped; | 227 !clip_node->data.target_is_clipped; |
| (...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1372 void UpdateElasticOverscroll(PropertyTrees* property_trees, | 1365 void UpdateElasticOverscroll(PropertyTrees* property_trees, |
| 1373 const Layer* overscroll_elasticity_layer, | 1366 const Layer* overscroll_elasticity_layer, |
| 1374 const gfx::Vector2dF& elastic_overscroll) { | 1367 const gfx::Vector2dF& elastic_overscroll) { |
| 1375 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, | 1368 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, |
| 1376 elastic_overscroll); | 1369 elastic_overscroll); |
| 1377 } | 1370 } |
| 1378 | 1371 |
| 1379 } // namespace draw_property_utils | 1372 } // namespace draw_property_utils |
| 1380 | 1373 |
| 1381 } // namespace cc | 1374 } // namespace cc |
| OLD | NEW |