Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: cc/trees/property_tree_builder.cc

Issue 1339923006: Set clip children in LayerTreeHostCommonTest.RenderSurfaceWithUnclippedDescendantsClipsSubtree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698