| 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_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 9315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9326 EXPECT_EQ(transform_node->owner_id, significant_transform->id()); | 9326 EXPECT_EQ(transform_node->owner_id, significant_transform->id()); |
| 9327 | 9327 |
| 9328 EXPECT_TRUE(root->has_render_surface()); | 9328 EXPECT_TRUE(root->has_render_surface()); |
| 9329 EXPECT_FALSE(significant_transform->has_render_surface()); | 9329 EXPECT_FALSE(significant_transform->has_render_surface()); |
| 9330 EXPECT_TRUE(layer_clips_subtree->has_render_surface()); | 9330 EXPECT_TRUE(layer_clips_subtree->has_render_surface()); |
| 9331 EXPECT_TRUE(render_surface->has_render_surface()); | 9331 EXPECT_TRUE(render_surface->has_render_surface()); |
| 9332 EXPECT_FALSE(test_layer->has_render_surface()); | 9332 EXPECT_FALSE(test_layer->has_render_surface()); |
| 9333 | 9333 |
| 9334 ClipTree& clip_tree = root->layer_tree_impl()->property_trees()->clip_tree; | 9334 ClipTree& clip_tree = root->layer_tree_impl()->property_trees()->clip_tree; |
| 9335 ClipNode* clip_node = clip_tree.Node(render_surface->clip_tree_index()); | 9335 ClipNode* clip_node = clip_tree.Node(render_surface->clip_tree_index()); |
| 9336 EXPECT_FALSE(clip_node->applies_local_clip); | 9336 EXPECT_EQ(clip_node->clip_type, ClipNode::ClipType::NONE); |
| 9337 EXPECT_EQ(gfx::Rect(20, 20), test_layer->visible_layer_rect()); | 9337 EXPECT_EQ(gfx::Rect(20, 20), test_layer->visible_layer_rect()); |
| 9338 | 9338 |
| 9339 // Also test the visible rects computed by combining clips in root space. | 9339 // Also test the visible rects computed by combining clips in root space. |
| 9340 gfx::Rect visible_rect = draw_property_utils::ComputeLayerVisibleRectDynamic( | 9340 gfx::Rect visible_rect = draw_property_utils::ComputeLayerVisibleRectDynamic( |
| 9341 root->layer_tree_impl()->property_trees(), test_layer); | 9341 root->layer_tree_impl()->property_trees(), test_layer); |
| 9342 EXPECT_EQ(gfx::Rect(30, 20), visible_rect); | 9342 EXPECT_EQ(gfx::Rect(30, 20), visible_rect); |
| 9343 } | 9343 } |
| 9344 | 9344 |
| 9345 TEST_F(LayerTreeHostCommonTest, TransformOfParentClipNodeAncestorOfTarget) { | 9345 TEST_F(LayerTreeHostCommonTest, TransformOfParentClipNodeAncestorOfTarget) { |
| 9346 // Ensure that when parent clip node's transform is an ancestor of current | 9346 // Ensure that when parent clip node's transform is an ancestor of current |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10293 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); | 10293 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); |
| 10294 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); | 10294 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); |
| 10295 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); | 10295 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); |
| 10296 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); | 10296 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); |
| 10297 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); | 10297 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); |
| 10298 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); | 10298 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); |
| 10299 } | 10299 } |
| 10300 | 10300 |
| 10301 } // namespace | 10301 } // namespace |
| 10302 } // namespace cc | 10302 } // namespace cc |
| OLD | NEW |