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

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: PAC 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
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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 EXPECT_FALSE(result_layer); 440 EXPECT_FALSE(result_layer);
441 441
442 test_point = gfx::PointF(140.f, 140.f); 442 test_point = gfx::PointF(140.f, 140.f);
443 result_layer = 443 result_layer =
444 host_impl().active_tree()->FindLayerThatIsHitByPoint(test_point); 444 host_impl().active_tree()->FindLayerThatIsHitByPoint(test_point);
445 ASSERT_TRUE(result_layer); 445 ASSERT_TRUE(result_layer);
446 EXPECT_EQ(5, result_layer->id()); 446 EXPECT_EQ(5, result_layer->id());
447 447
448 ClipTree& clip_tree = host_impl().active_tree()->property_trees()->clip_tree; 448 ClipTree& clip_tree = host_impl().active_tree()->property_trees()->clip_tree;
449 ClipNode* clip_node = clip_tree.Node(result_layer->clip_tree_index()); 449 ClipNode* clip_node = clip_tree.Node(result_layer->clip_tree_index());
450 EXPECT_NE(clip_node->data.transform_id, clip_node->data.target_id); 450 EXPECT_NE(clip_node->data.transform_id, clip_node->data.target_transform_id);
451 } 451 }
452 452
453 TEST_F(LayerTreeImplTest, HitTestingSiblings) { 453 TEST_F(LayerTreeImplTest, HitTestingSiblings) {
454 // This tests hit testing when the test point hits only one of the siblings. 454 // This tests hit testing when the test point hits only one of the siblings.
455 gfx::Transform identity_matrix; 455 gfx::Transform identity_matrix;
456 std::unique_ptr<LayerImpl> root = 456 std::unique_ptr<LayerImpl> root =
457 LayerImpl::Create(host_impl().active_tree(), 1); 457 LayerImpl::Create(host_impl().active_tree(), 1);
458 SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(), 458 SetLayerPropertiesForTesting(root.get(), identity_matrix, gfx::Point3F(),
459 gfx::PointF(), gfx::Size(100, 100), true, false, 459 gfx::PointF(), gfx::Size(100, 100), true, false,
460 true); 460 true);
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2566 gfx::PointF test_point = gfx::PointF(1.f, 1.f); 2566 gfx::PointF test_point = gfx::PointF(1.f, 1.f);
2567 LayerImpl* result_layer = 2567 LayerImpl* result_layer =
2568 host_impl().active_tree()->FindLayerThatIsHitByPoint(test_point); 2568 host_impl().active_tree()->FindLayerThatIsHitByPoint(test_point);
2569 2569
2570 CHECK(result_layer); 2570 CHECK(result_layer);
2571 EXPECT_EQ(2, result_layer->id()); 2571 EXPECT_EQ(2, result_layer->id());
2572 } 2572 }
2573 2573
2574 } // namespace 2574 } // namespace
2575 } // namespace cc 2575 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698