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

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

Issue 2437923002: cc: Change ClipNode::applies_local_clip to a clip_type enum (Closed)
Patch Set: Fix Windows build Created 4 years, 2 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') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 const TransformTree& transform_tree = property_trees->transform_tree; 1771 const TransformTree& transform_tree = property_trees->transform_tree;
1772 const ClipNode* clip_node = clip_tree.Node(1); 1772 const ClipNode* clip_node = clip_tree.Node(1);
1773 gfx::Rect combined_clip_in_target_space = 1773 gfx::Rect combined_clip_in_target_space =
1774 gfx::ToEnclosingRect(clip_node->combined_clip_in_target_space); 1774 gfx::ToEnclosingRect(clip_node->combined_clip_in_target_space);
1775 if (!PointHitsRect(screen_space_point, gfx::Transform(), 1775 if (!PointHitsRect(screen_space_point, gfx::Transform(),
1776 combined_clip_in_target_space, NULL)) 1776 combined_clip_in_target_space, NULL))
1777 return true; 1777 return true;
1778 1778
1779 for (const ClipNode* clip_node = clip_tree.Node(layer->clip_tree_index()); 1779 for (const ClipNode* clip_node = clip_tree.Node(layer->clip_tree_index());
1780 clip_node->id > 1; clip_node = clip_tree.parent(clip_node)) { 1780 clip_node->id > 1; clip_node = clip_tree.parent(clip_node)) {
1781 if (clip_node->applies_local_clip) { 1781 if (clip_node->clip_type == ClipNode::ClipType::APPLIES_LOCAL_CLIP) {
1782 const TransformNode* transform_node = 1782 const TransformNode* transform_node =
1783 transform_tree.Node(clip_node->target_transform_id); 1783 transform_tree.Node(clip_node->target_transform_id);
1784 gfx::Rect combined_clip_in_target_space = 1784 gfx::Rect combined_clip_in_target_space =
1785 gfx::ToEnclosingRect(clip_node->combined_clip_in_target_space); 1785 gfx::ToEnclosingRect(clip_node->combined_clip_in_target_space);
1786 1786
1787 const LayerImpl* target_layer = 1787 const LayerImpl* target_layer =
1788 layer->layer_tree_impl()->LayerById(transform_node->owner_id); 1788 layer->layer_tree_impl()->LayerById(transform_node->owner_id);
1789 DCHECK(transform_node->id == 0 || target_layer->render_surface() || 1789 DCHECK(transform_node->id == 0 || target_layer->render_surface() ||
1790 layer->layer_tree_impl()->is_in_resourceless_software_draw_mode()); 1790 layer->layer_tree_impl()->is_in_resourceless_software_draw_mode());
1791 gfx::Transform surface_screen_space_transform = 1791 gfx::Transform surface_screen_space_transform =
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2073 2073
2074 void LayerTreeImpl::ResetAllChangeTracking() { 2074 void LayerTreeImpl::ResetAllChangeTracking() {
2075 layers_that_should_push_properties_.clear(); 2075 layers_that_should_push_properties_.clear();
2076 // Iterate over all layers, including masks. 2076 // Iterate over all layers, including masks.
2077 for (auto& layer : *layers_) 2077 for (auto& layer : *layers_)
2078 layer->ResetChangeTracking(); 2078 layer->ResetChangeTracking();
2079 property_trees_.ResetAllChangeTracking(); 2079 property_trees_.ResetAllChangeTracking();
2080 } 2080 }
2081 2081
2082 } // namespace cc 2082 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698