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

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

Issue 1908593002: cc : Stop pushing transform origin from Layer and LayerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_impl_unittest.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_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 8556 matching lines...) Expand 10 before | Expand all | Expand 10 after
8567 SetLayerPropertiesForTesting(child, scale_matrix, gfx::Point3F(), 8567 SetLayerPropertiesForTesting(child, scale_matrix, gfx::Point3F(),
8568 gfx::PointF(), gfx::Size(10, 10), true, false, 8568 gfx::PointF(), gfx::Size(10, 10), true, false,
8569 false); 8569 false);
8570 8570
8571 root->SetDrawsContent(true); 8571 root->SetDrawsContent(true);
8572 child->SetDrawsContent(true); 8572 child->SetDrawsContent(true);
8573 8573
8574 ExecuteCalculateDrawProperties(root); 8574 ExecuteCalculateDrawProperties(root);
8575 EXPECT_EQ(gfx::Rect(10, 10), child->visible_layer_rect()); 8575 EXPECT_EQ(gfx::Rect(10, 10), child->visible_layer_rect());
8576 8576
8577 child->SetTransformOrigin(gfx::Point3F(10.f, 10.f, 10.f)); 8577 child->test_properties()->transform_origin = gfx::Point3F(10.f, 10.f, 10.f);
8578 8578
8579 root->layer_tree_impl()->property_trees()->needs_rebuild = true; 8579 root->layer_tree_impl()->property_trees()->needs_rebuild = true;
8580 ExecuteCalculateDrawProperties(root); 8580 ExecuteCalculateDrawProperties(root);
8581 EXPECT_EQ(gfx::Rect(5, 5, 5, 5), child->visible_layer_rect()); 8581 EXPECT_EQ(gfx::Rect(5, 5, 5, 5), child->visible_layer_rect());
8582 } 8582 }
8583 8583
8584 TEST_F(LayerTreeHostCommonTest, UpdateScrollChildPosition) { 8584 TEST_F(LayerTreeHostCommonTest, UpdateScrollChildPosition) {
8585 LayerImpl* root = root_layer(); 8585 LayerImpl* root = root_layer();
8586 LayerImpl* scroll_parent = AddChild<LayerImpl>(root); 8586 LayerImpl* scroll_parent = AddChild<LayerImpl>(root);
8587 LayerImpl* scroll_child = AddChild<LayerImpl>(scroll_parent); 8587 LayerImpl* scroll_child = AddChild<LayerImpl>(scroll_parent);
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
10066 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); 10066 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index());
10067 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); 10067 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index());
10068 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); 10068 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index());
10069 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); 10069 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index());
10070 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); 10070 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index());
10071 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); 10071 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index());
10072 } 10072 }
10073 10073
10074 } // namespace 10074 } // namespace
10075 } // namespace cc 10075 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698