OLD | NEW |
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 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 gfx::Rect combined_clip_in_target_space = | 1662 gfx::Rect combined_clip_in_target_space = |
1663 gfx::ToEnclosingRect(clip_node->data.combined_clip_in_target_space); | 1663 gfx::ToEnclosingRect(clip_node->data.combined_clip_in_target_space); |
1664 if (!PointHitsRect(screen_space_point, gfx::Transform(), | 1664 if (!PointHitsRect(screen_space_point, gfx::Transform(), |
1665 combined_clip_in_target_space, NULL)) | 1665 combined_clip_in_target_space, NULL)) |
1666 return true; | 1666 return true; |
1667 | 1667 |
1668 for (const ClipNode* clip_node = clip_tree.Node(layer->clip_tree_index()); | 1668 for (const ClipNode* clip_node = clip_tree.Node(layer->clip_tree_index()); |
1669 clip_node->id > 1; clip_node = clip_tree.parent(clip_node)) { | 1669 clip_node->id > 1; clip_node = clip_tree.parent(clip_node)) { |
1670 if (clip_node->data.applies_local_clip) { | 1670 if (clip_node->data.applies_local_clip) { |
1671 const TransformNode* transform_node = | 1671 const TransformNode* transform_node = |
1672 transform_tree.Node(clip_node->data.target_id); | 1672 transform_tree.Node(clip_node->data.target_transform_id); |
1673 gfx::Rect combined_clip_in_target_space = | 1673 gfx::Rect combined_clip_in_target_space = |
1674 gfx::ToEnclosingRect(clip_node->data.combined_clip_in_target_space); | 1674 gfx::ToEnclosingRect(clip_node->data.combined_clip_in_target_space); |
1675 | 1675 |
1676 const LayerImpl* target_layer = | 1676 const LayerImpl* target_layer = |
1677 layer->layer_tree_impl()->LayerById(transform_node->owner_id); | 1677 layer->layer_tree_impl()->LayerById(transform_node->owner_id); |
1678 DCHECK(transform_node->id == 0 || target_layer->render_surface() || | 1678 DCHECK(transform_node->id == 0 || target_layer->render_surface() || |
1679 layer->layer_tree_impl()->is_in_resourceless_software_draw_mode()); | 1679 layer->layer_tree_impl()->is_in_resourceless_software_draw_mode()); |
1680 gfx::Transform surface_screen_space_transform = | 1680 gfx::Transform surface_screen_space_transform = |
1681 transform_node->id == 0 || | 1681 transform_node->id == 0 || |
1682 (layer->layer_tree_impl() | 1682 (layer->layer_tree_impl() |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2105 | 2105 |
2106 void LayerTreeImpl::ResetAllChangeTracking() { | 2106 void LayerTreeImpl::ResetAllChangeTracking() { |
2107 layers_that_should_push_properties_.clear(); | 2107 layers_that_should_push_properties_.clear(); |
2108 // Iterate over all layers, including masks and replicas. | 2108 // Iterate over all layers, including masks and replicas. |
2109 for (auto& layer : *layers_) | 2109 for (auto& layer : *layers_) |
2110 layer->ResetChangeTracking(); | 2110 layer->ResetChangeTracking(); |
2111 property_trees_.ResetAllChangeTracking(); | 2111 property_trees_.ResetAllChangeTracking(); |
2112 } | 2112 } |
2113 | 2113 |
2114 } // namespace cc | 2114 } // namespace cc |
OLD | NEW |