| 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 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 bool include_expanding_clips = true; | 618 bool include_expanding_clips = true; |
| 619 ConditionalClip accumulated_clip = ComputeAccumulatedClip( | 619 ConditionalClip accumulated_clip = ComputeAccumulatedClip( |
| 620 property_trees, include_expanding_clips, layer->clip_tree_index(), | 620 property_trees, include_expanding_clips, layer->clip_tree_index(), |
| 621 effect_ancestor_with_copy_request); | 621 effect_ancestor_with_copy_request); |
| 622 if (!accumulated_clip.is_clipped) | 622 if (!accumulated_clip.is_clipped) |
| 623 return layer_content_rect; | 623 return layer_content_rect; |
| 624 accumulated_clip_in_root_space = accumulated_clip.clip_rect; | 624 accumulated_clip_in_root_space = accumulated_clip.clip_rect; |
| 625 } else { | 625 } else { |
| 626 const ClipNode* clip_node = | 626 const ClipNode* clip_node = |
| 627 property_trees->clip_tree.Node(layer->clip_tree_index()); | 627 property_trees->clip_tree.Node(layer->clip_tree_index()); |
| 628 const EffectNode* effect_node = property_trees->effect_tree.Node( | 628 accumulated_clip_in_root_space = |
| 629 layer->render_target_effect_tree_index()); | 629 clip_node->cached_accumulated_rect_in_screen_space; |
| 630 bool fully_visible = | |
| 631 !layer->is_clipped() && !effect_node->surface_is_clipped; | |
| 632 if (fully_visible) { | |
| 633 accumulated_clip_in_root_space = property_trees->clip_tree.ViewportClip(); | |
| 634 } else { | |
| 635 accumulated_clip_in_root_space = | |
| 636 clip_node->cached_accumulated_rect_in_screen_space; | |
| 637 } | |
| 638 } | 630 } |
| 639 | 631 |
| 640 const EffectNode* root_effect_node = | 632 const EffectNode* root_effect_node = |
| 641 non_root_copy_request | 633 non_root_copy_request |
| 642 ? property_trees->effect_tree.Node(effect_ancestor_with_copy_request) | 634 ? property_trees->effect_tree.Node(effect_ancestor_with_copy_request) |
| 643 : property_trees->effect_tree.Node(EffectTree::kContentsRootNodeId); | 635 : property_trees->effect_tree.Node(EffectTree::kContentsRootNodeId); |
| 644 ConditionalClip accumulated_clip_in_layer_space = | 636 ConditionalClip accumulated_clip_in_layer_space = |
| 645 ComputeTargetRectInLocalSpace( | 637 ComputeTargetRectInLocalSpace( |
| 646 accumulated_clip_in_root_space, property_trees, | 638 accumulated_clip_in_root_space, property_trees, |
| 647 root_effect_node->transform_id, layer->transform_tree_index(), | 639 root_effect_node->transform_id, layer->transform_tree_index(), |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 void UpdateElasticOverscroll(PropertyTrees* property_trees, | 1022 void UpdateElasticOverscroll(PropertyTrees* property_trees, |
| 1031 const Layer* overscroll_elasticity_layer, | 1023 const Layer* overscroll_elasticity_layer, |
| 1032 const gfx::Vector2dF& elastic_overscroll) { | 1024 const gfx::Vector2dF& elastic_overscroll) { |
| 1033 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, | 1025 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, |
| 1034 elastic_overscroll); | 1026 elastic_overscroll); |
| 1035 } | 1027 } |
| 1036 | 1028 |
| 1037 } // namespace draw_property_utils | 1029 } // namespace draw_property_utils |
| 1038 | 1030 |
| 1039 } // namespace cc | 1031 } // namespace cc |
| OLD | NEW |