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

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

Issue 634683003: Converted LayerImpl::bounds() to return SizeF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/occlusion_tracker_unittest.cc ('k') | no next file » | 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/tree_synchronizer.h" 5 #include "cc/trees/tree_synchronizer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 // Check that the property values we set on the Layer tree are reflected in 355 // Check that the property values we set on the Layer tree are reflected in
356 // the LayerImpl tree. 356 // the LayerImpl tree.
357 gfx::PointF root_layer_impl_position = layer_impl_tree_root->position(); 357 gfx::PointF root_layer_impl_position = layer_impl_tree_root->position();
358 EXPECT_EQ(root_position.x(), root_layer_impl_position.x()); 358 EXPECT_EQ(root_position.x(), root_layer_impl_position.x());
359 EXPECT_EQ(root_position.y(), root_layer_impl_position.y()); 359 EXPECT_EQ(root_position.y(), root_layer_impl_position.y());
360 360
361 EXPECT_EQ(first_child_opacity, 361 EXPECT_EQ(first_child_opacity,
362 layer_impl_tree_root->children()[0]->opacity()); 362 layer_impl_tree_root->children()[0]->opacity());
363 363
364 gfx::Size second_layer_impl_child_bounds = 364 gfx::SizeF second_layer_impl_child_bounds =
365 layer_impl_tree_root->children()[1]->bounds(); 365 layer_impl_tree_root->children()[1]->bounds();
366 EXPECT_EQ(second_child_bounds.width(), 366 EXPECT_EQ(second_child_bounds.width(),
367 second_layer_impl_child_bounds.width()); 367 second_layer_impl_child_bounds.width());
368 EXPECT_EQ(second_child_bounds.height(), 368 EXPECT_EQ(second_child_bounds.height(),
369 second_layer_impl_child_bounds.height()); 369 second_layer_impl_child_bounds.height());
370 } 370 }
371 371
372 TEST_F(TreeSynchronizerTest, ReuseLayerImplsAfterStructuralChange) { 372 TEST_F(TreeSynchronizerTest, ReuseLayerImplsAfterStructuralChange) {
373 std::vector<int> layer_impl_destruction_list; 373 std::vector<int> layer_impl_destruction_list;
374 374
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 host_impl->active_tree()); 751 host_impl->active_tree());
752 752
753 // The clip children should have been unhooked. 753 // The clip children should have been unhooked.
754 EXPECT_EQ(2u, intervening->children().size()); 754 EXPECT_EQ(2u, intervening->children().size());
755 EXPECT_FALSE(clip_child2->clip_parent()); 755 EXPECT_FALSE(clip_child2->clip_parent());
756 EXPECT_FALSE(additional_clip_child->clip_parent()); 756 EXPECT_FALSE(additional_clip_child->clip_parent());
757 } 757 }
758 758
759 } // namespace 759 } // namespace
760 } // namespace cc 760 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/occlusion_tracker_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698