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

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

Issue 1180073015: cc: Remove LayerImpl::SetContentBounds() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm-setcontentbounds: . Created 5 years, 6 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/damage_tracker_unittest.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 <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 7944 matching lines...) Expand 10 before | Expand all | Expand 10 after
7955 7955
7956 LayerImpl* root = host_impl.active_tree()->root_layer(); 7956 LayerImpl* root = host_impl.active_tree()->root_layer();
7957 SetLayerPropertiesForTesting(root, 7957 SetLayerPropertiesForTesting(root,
7958 identity_matrix, 7958 identity_matrix,
7959 gfx::Point3F(), 7959 gfx::Point3F(),
7960 gfx::PointF(), 7960 gfx::PointF(),
7961 root_size, 7961 root_size,
7962 false, 7962 false,
7963 false, 7963 false,
7964 true); 7964 true);
7965
7966 root->SetContentBounds(root_size);
7967 root->SetMasksToBounds(true); 7965 root->SetMasksToBounds(true);
7968 7966
7969 root->AddChild(LayerImpl::Create(host_impl.active_tree(), 2)); 7967 root->AddChild(LayerImpl::Create(host_impl.active_tree(), 2));
7970 7968
7971 LayerImpl* sublayer = root->child_at(0); 7969 LayerImpl* sublayer = root->child_at(0);
7972 SetLayerPropertiesForTesting(sublayer, 7970 SetLayerPropertiesForTesting(sublayer,
7973 identity_matrix, 7971 identity_matrix,
7974 gfx::Point3F(), 7972 gfx::Point3F(),
7975 gfx::PointF(), 7973 gfx::PointF(),
7976 sublayer_size, 7974 sublayer_size,
7977 false, 7975 false,
7978 false, 7976 false,
7979 false); 7977 false);
7980
7981 sublayer->SetContentBounds(sublayer_size);
7982 sublayer->SetDrawsContent(true); 7978 sublayer->SetDrawsContent(true);
7983 7979
7984 LayerImplList layer_impl_list; 7980 LayerImplList layer_impl_list;
7985 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( 7981 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
7986 root, device_viewport_size, &layer_impl_list); 7982 root, device_viewport_size, &layer_impl_list);
7987 7983
7988 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 7984 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
7989 7985
7990 EXPECT_EQ(gfx::Rect(root_size), sublayer->visible_content_rect()); 7986 EXPECT_EQ(gfx::Rect(root_size), sublayer->visible_content_rect());
7991 7987
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
8810 EXPECT_FALSE(root->layer_or_descendant_is_drawn()); 8806 EXPECT_FALSE(root->layer_or_descendant_is_drawn());
8811 EXPECT_FALSE(root->visited()); 8807 EXPECT_FALSE(root->visited());
8812 EXPECT_FALSE(root->sorted_for_recursion()); 8808 EXPECT_FALSE(root->sorted_for_recursion());
8813 EXPECT_FALSE(child->layer_or_descendant_is_drawn()); 8809 EXPECT_FALSE(child->layer_or_descendant_is_drawn());
8814 EXPECT_FALSE(child->visited()); 8810 EXPECT_FALSE(child->visited());
8815 EXPECT_FALSE(child->sorted_for_recursion()); 8811 EXPECT_FALSE(child->sorted_for_recursion());
8816 } 8812 }
8817 8813
8818 } // namespace 8814 } // namespace
8819 } // namespace cc 8815 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/damage_tracker_unittest.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