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

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

Issue 2127323002: cc: Use sublayer scale from effect tree (1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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_impl.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 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/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "cc/layers/heads_up_display_layer_impl.h" 7 #include "cc/layers/heads_up_display_layer_impl.h"
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "cc/layers/solid_color_scrollbar_layer_impl.h" 9 #include "cc/layers/solid_color_scrollbar_layer_impl.h"
10 #include "cc/test/fake_impl_task_runner_provider.h" 10 #include "cc/test/fake_impl_task_runner_provider.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 EXPECT_FALSE(result_layer); 441 EXPECT_FALSE(result_layer);
442 442
443 test_point = gfx::PointF(140.f, 140.f); 443 test_point = gfx::PointF(140.f, 140.f);
444 result_layer = 444 result_layer =
445 host_impl().active_tree()->FindLayerThatIsHitByPoint(test_point); 445 host_impl().active_tree()->FindLayerThatIsHitByPoint(test_point);
446 ASSERT_TRUE(result_layer); 446 ASSERT_TRUE(result_layer);
447 EXPECT_EQ(5, result_layer->id()); 447 EXPECT_EQ(5, result_layer->id());
448 448
449 ClipTree& clip_tree = host_impl().active_tree()->property_trees()->clip_tree; 449 ClipTree& clip_tree = host_impl().active_tree()->property_trees()->clip_tree;
450 ClipNode* clip_node = clip_tree.Node(result_layer->clip_tree_index()); 450 ClipNode* clip_node = clip_tree.Node(result_layer->clip_tree_index());
451 EXPECT_NE(clip_node->transform_id, clip_node->target_id); 451 EXPECT_NE(clip_node->transform_id, clip_node->target_transform_id);
452 } 452 }
453 453
454 TEST_F(LayerTreeImplTest, HitTestingSiblings) { 454 TEST_F(LayerTreeImplTest, HitTestingSiblings) {
455 // This tests hit testing when the test point hits only one of the siblings. 455 // This tests hit testing when the test point hits only one of the siblings.
456 gfx::Transform identity_matrix; 456 gfx::Transform identity_matrix;
457 std::unique_ptr<LayerImpl> root = 457 std::unique_ptr<LayerImpl> root =
458 LayerImpl::Create(host_impl().active_tree(), 1); 458 LayerImpl::Create(host_impl().active_tree(), 1);
459 SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(), 459 SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
460 gfx::PointF(), gfx::Size(100, 100), true, false, 460 gfx::PointF(), gfx::Size(100, 100), true, false,
461 true); 461 true);
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 gfx::PointF test_point = gfx::PointF(1.f, 1.f); 2567 gfx::PointF test_point = gfx::PointF(1.f, 1.f);
2568 LayerImpl* result_layer = 2568 LayerImpl* result_layer =
2569 host_impl().active_tree()->FindLayerThatIsHitByPoint(test_point); 2569 host_impl().active_tree()->FindLayerThatIsHitByPoint(test_point);
2570 2570
2571 CHECK(result_layer); 2571 CHECK(result_layer);
2572 EXPECT_EQ(2, result_layer->id()); 2572 EXPECT_EQ(2, result_layer->id());
2573 } 2573 }
2574 2574
2575 } // namespace 2575 } // namespace
2576 } // namespace cc 2576 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698