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/property_tree_builder.h" | 5 #include "cc/trees/property_tree_builder.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 bool ancestor_clips_subtree = | 102 bool ancestor_clips_subtree = |
103 data_from_ancestor.ancestor_clips_subtree || | 103 data_from_ancestor.ancestor_clips_subtree || |
104 (layer->clip_parent() && layer->clip_parent()->is_clipped()); | 104 (layer->clip_parent() && layer->clip_parent()->is_clipped()); |
105 | 105 |
106 data_for_children->ancestor_clips_subtree = false; | 106 data_for_children->ancestor_clips_subtree = false; |
107 bool has_unclipped_surface = false; | 107 bool has_unclipped_surface = false; |
108 | 108 |
109 if (layer->has_render_surface()) { | 109 if (layer->has_render_surface()) { |
110 if (ancestor_clips_subtree && layer->num_unclipped_descendants() > 0) | 110 if (ancestor_clips_subtree && layer->num_unclipped_descendants() > 0) |
111 data_for_children->ancestor_clips_subtree = true; | 111 data_for_children->ancestor_clips_subtree = true; |
112 else if (!ancestor_clips_subtree && !layer->num_unclipped_descendants()) | 112 else if (!ancestor_clips_subtree) |
113 has_unclipped_surface = true; | 113 has_unclipped_surface = true; |
114 } else { | 114 } else { |
115 data_for_children->ancestor_clips_subtree = ancestor_clips_subtree; | 115 data_for_children->ancestor_clips_subtree = ancestor_clips_subtree; |
116 } | 116 } |
117 | 117 |
118 bool layer_clips_subtree = LayerClipsSubtree(layer); | 118 bool layer_clips_subtree = LayerClipsSubtree(layer); |
119 if (layer_clips_subtree) | 119 if (layer_clips_subtree) |
120 data_for_children->ancestor_clips_subtree = true; | 120 data_for_children->ancestor_clips_subtree = true; |
121 | 121 |
122 if (has_unclipped_surface) | 122 if (has_unclipped_surface) |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 const gfx::Rect& viewport, | 534 const gfx::Rect& viewport, |
535 const gfx::Transform& device_transform, | 535 const gfx::Transform& device_transform, |
536 PropertyTrees* property_trees) { | 536 PropertyTrees* property_trees) { |
537 BuildPropertyTreesTopLevelInternal( | 537 BuildPropertyTreesTopLevelInternal( |
538 root_layer, page_scale_layer, inner_viewport_scroll_layer, | 538 root_layer, page_scale_layer, inner_viewport_scroll_layer, |
539 outer_viewport_scroll_layer, page_scale_factor, device_scale_factor, | 539 outer_viewport_scroll_layer, page_scale_factor, device_scale_factor, |
540 viewport, device_transform, property_trees); | 540 viewport, device_transform, property_trees); |
541 } | 541 } |
542 | 542 |
543 } // namespace cc | 543 } // namespace cc |
OLD | NEW |