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

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

Issue 1924933002: cc : Stop pushing properties not used by LayerImpl to LayerImpl (4) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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_host_common.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 3801 matching lines...) Expand 10 before | Expand all | Expand 10 after
3812 EXPECT_EQ(gfx::Rect(100, 100), render_surface2->visible_layer_rect()); 3812 EXPECT_EQ(gfx::Rect(100, 100), render_surface2->visible_layer_rect());
3813 } 3813 }
3814 3814
3815 TEST_F(LayerTreeHostCommonTest, ClipChildWithSingularTransform) { 3815 TEST_F(LayerTreeHostCommonTest, ClipChildWithSingularTransform) {
3816 LayerImpl* root = root_layer(); 3816 LayerImpl* root = root_layer();
3817 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 3817 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
3818 LayerImpl* intervening = AddChild<LayerImpl>(clip_parent); 3818 LayerImpl* intervening = AddChild<LayerImpl>(clip_parent);
3819 LayerImpl* clip_child = AddChild<LayerImpl>(intervening); 3819 LayerImpl* clip_child = AddChild<LayerImpl>(intervening);
3820 3820
3821 clip_child->SetDrawsContent(true); 3821 clip_child->SetDrawsContent(true);
3822 clip_child->SetClipParent(clip_parent); 3822 clip_child->test_properties()->clip_parent = clip_parent;
3823 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 3823 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
3824 clip_children->insert(clip_child); 3824 clip_children->insert(clip_child);
3825 clip_parent->SetClipChildren(clip_children.release()); 3825 clip_parent->test_properties()->clip_children.reset(clip_children.release());
3826 3826
3827 gfx::Transform identity_matrix; 3827 gfx::Transform identity_matrix;
3828 gfx::Transform singular_matrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); 3828 gfx::Transform singular_matrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
3829 ASSERT_FALSE(singular_matrix.IsInvertible()); 3829 ASSERT_FALSE(singular_matrix.IsInvertible());
3830 3830
3831 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 3831 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
3832 gfx::PointF(), gfx::Size(100, 100), true, false, 3832 gfx::PointF(), gfx::Size(100, 100), true, false,
3833 true); 3833 true);
3834 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 3834 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
3835 gfx::PointF(), gfx::Size(50, 50), true, false, 3835 gfx::PointF(), gfx::Size(50, 50), true, false,
(...skipping 13 matching lines...) Expand all
3849 VisibleRectsWhenClipChildIsBetweenTwoRenderSurfaces) { 3849 VisibleRectsWhenClipChildIsBetweenTwoRenderSurfaces) {
3850 LayerImpl* root = root_layer(); 3850 LayerImpl* root = root_layer();
3851 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 3851 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
3852 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent); 3852 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent);
3853 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface1); 3853 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface1);
3854 LayerImpl* render_surface2 = AddChild<LayerImpl>(clip_child); 3854 LayerImpl* render_surface2 = AddChild<LayerImpl>(clip_child);
3855 3855
3856 render_surface1->SetDrawsContent(true); 3856 render_surface1->SetDrawsContent(true);
3857 render_surface2->SetDrawsContent(true); 3857 render_surface2->SetDrawsContent(true);
3858 clip_child->SetDrawsContent(true); 3858 clip_child->SetDrawsContent(true);
3859 clip_child->SetClipParent(clip_parent); 3859 clip_child->test_properties()->clip_parent = clip_parent;
3860 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 3860 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
3861 clip_children->insert(clip_child); 3861 clip_children->insert(clip_child);
3862 clip_parent->SetClipChildren(clip_children.release()); 3862 clip_parent->test_properties()->clip_children.reset(clip_children.release());
3863 3863
3864 gfx::Transform identity_matrix; 3864 gfx::Transform identity_matrix;
3865 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 3865 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
3866 gfx::PointF(), gfx::Size(100, 100), true, false, 3866 gfx::PointF(), gfx::Size(100, 100), true, false,
3867 true); 3867 true);
3868 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 3868 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
3869 gfx::PointF(), gfx::Size(50, 50), true, false, 3869 gfx::PointF(), gfx::Size(50, 50), true, false,
3870 false); 3870 false);
3871 SetLayerPropertiesForTesting(render_surface1, identity_matrix, gfx::Point3F(), 3871 SetLayerPropertiesForTesting(render_surface1, identity_matrix, gfx::Point3F(),
3872 gfx::PointF(), gfx::Size(20, 20), true, false, 3872 gfx::PointF(), gfx::Size(20, 20), true, false,
(...skipping 16 matching lines...) Expand all
3889 TEST_F(LayerTreeHostCommonTest, ClipRectOfSurfaceWhoseParentIsAClipChild) { 3889 TEST_F(LayerTreeHostCommonTest, ClipRectOfSurfaceWhoseParentIsAClipChild) {
3890 LayerImpl* root = root_layer(); 3890 LayerImpl* root = root_layer();
3891 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 3891 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
3892 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent); 3892 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent);
3893 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface1); 3893 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface1);
3894 LayerImpl* render_surface2 = AddChild<LayerImpl>(clip_child); 3894 LayerImpl* render_surface2 = AddChild<LayerImpl>(clip_child);
3895 3895
3896 render_surface1->SetDrawsContent(true); 3896 render_surface1->SetDrawsContent(true);
3897 render_surface2->SetDrawsContent(true); 3897 render_surface2->SetDrawsContent(true);
3898 clip_child->SetDrawsContent(true); 3898 clip_child->SetDrawsContent(true);
3899 clip_child->SetClipParent(clip_parent); 3899 clip_child->test_properties()->clip_parent = clip_parent;
3900 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 3900 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
3901 clip_children->insert(clip_child); 3901 clip_children->insert(clip_child);
3902 clip_parent->SetClipChildren(clip_children.release()); 3902 clip_parent->test_properties()->clip_children.reset(clip_children.release());
3903 3903
3904 gfx::Transform identity_matrix; 3904 gfx::Transform identity_matrix;
3905 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 3905 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
3906 gfx::PointF(), gfx::Size(100, 100), true, false, 3906 gfx::PointF(), gfx::Size(100, 100), true, false,
3907 true); 3907 true);
3908 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 3908 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
3909 gfx::PointF(2.f, 2.f), gfx::Size(50, 50), true, 3909 gfx::PointF(2.f, 2.f), gfx::Size(50, 50), true,
3910 false, false); 3910 false, false);
3911 SetLayerPropertiesForTesting(render_surface1, identity_matrix, gfx::Point3F(), 3911 SetLayerPropertiesForTesting(render_surface1, identity_matrix, gfx::Point3F(),
3912 gfx::PointF(), gfx::Size(20, 20), true, false, 3912 gfx::PointF(), gfx::Size(20, 20), true, false,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
3959 LayerImpl* root = root_layer(); 3959 LayerImpl* root = root_layer();
3960 LayerImpl* unclipped_surface = AddChildToRoot<LayerImpl>(); 3960 LayerImpl* unclipped_surface = AddChildToRoot<LayerImpl>();
3961 LayerImpl* clip_parent = AddChild<LayerImpl>(unclipped_surface); 3961 LayerImpl* clip_parent = AddChild<LayerImpl>(unclipped_surface);
3962 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent); 3962 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent);
3963 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface); 3963 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface);
3964 LayerImpl* clipped_surface = AddChild<LayerImpl>(clip_child); 3964 LayerImpl* clipped_surface = AddChild<LayerImpl>(clip_child);
3965 3965
3966 unclipped_surface->SetDrawsContent(true); 3966 unclipped_surface->SetDrawsContent(true);
3967 unclipped_desc_surface->SetDrawsContent(true); 3967 unclipped_desc_surface->SetDrawsContent(true);
3968 clipped_surface->SetDrawsContent(true); 3968 clipped_surface->SetDrawsContent(true);
3969 clip_child->SetClipParent(clip_parent); 3969 clip_child->test_properties()->clip_parent = clip_parent;
3970 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 3970 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
3971 clip_children->insert(clip_child); 3971 clip_children->insert(clip_child);
3972 clip_parent->SetClipChildren(clip_children.release()); 3972 clip_parent->test_properties()->clip_children.reset(clip_children.release());
3973 3973
3974 gfx::Transform identity_matrix; 3974 gfx::Transform identity_matrix;
3975 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 3975 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
3976 gfx::PointF(), gfx::Size(100, 100), true, false, 3976 gfx::PointF(), gfx::Size(100, 100), true, false,
3977 true); 3977 true);
3978 SetLayerPropertiesForTesting(unclipped_surface, identity_matrix, 3978 SetLayerPropertiesForTesting(unclipped_surface, identity_matrix,
3979 gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30), 3979 gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30),
3980 true, false, true); 3980 true, false, true);
3981 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 3981 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
3982 gfx::PointF(), gfx::Size(50, 50), true, false, 3982 gfx::PointF(), gfx::Size(50, 50), true, false,
(...skipping 22 matching lines...) Expand all
4005 LayerImpl* root = root_layer(); 4005 LayerImpl* root = root_layer();
4006 LayerImpl* unclipped_surface = AddChildToRoot<LayerImpl>(); 4006 LayerImpl* unclipped_surface = AddChildToRoot<LayerImpl>();
4007 LayerImpl* clip_parent = AddChild<LayerImpl>(unclipped_surface); 4007 LayerImpl* clip_parent = AddChild<LayerImpl>(unclipped_surface);
4008 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent); 4008 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent);
4009 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface); 4009 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface);
4010 LayerImpl* clipped_surface = AddChild<LayerImpl>(clip_child); 4010 LayerImpl* clipped_surface = AddChild<LayerImpl>(clip_child);
4011 4011
4012 unclipped_surface->SetDrawsContent(true); 4012 unclipped_surface->SetDrawsContent(true);
4013 unclipped_desc_surface->SetDrawsContent(true); 4013 unclipped_desc_surface->SetDrawsContent(true);
4014 clipped_surface->SetDrawsContent(true); 4014 clipped_surface->SetDrawsContent(true);
4015 clip_child->SetClipParent(clip_parent); 4015 clip_child->test_properties()->clip_parent = clip_parent;
4016 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 4016 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
4017 clip_children->insert(clip_child); 4017 clip_children->insert(clip_child);
4018 clip_parent->SetClipChildren(clip_children.release()); 4018 clip_parent->test_properties()->clip_children.reset(clip_children.release());
4019 4019
4020 gfx::Transform identity_matrix; 4020 gfx::Transform identity_matrix;
4021 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 4021 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
4022 gfx::PointF(), gfx::Size(10, 10), true, false, 4022 gfx::PointF(), gfx::Size(10, 10), true, false,
4023 true); 4023 true);
4024 SetLayerPropertiesForTesting(unclipped_surface, identity_matrix, 4024 SetLayerPropertiesForTesting(unclipped_surface, identity_matrix,
4025 gfx::Point3F(), gfx::PointF(), gfx::Size(50, 50), 4025 gfx::Point3F(), gfx::PointF(), gfx::Size(50, 50),
4026 true, false, true); 4026 true, false, true);
4027 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 4027 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
4028 gfx::PointF(), gfx::Size(50, 50), true, false, 4028 gfx::PointF(), gfx::Size(50, 50), true, false,
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
5898 // The render surface should be resized correctly and the clip child should 5898 // The render surface should be resized correctly and the clip child should
5899 // inherit the right clip rect. 5899 // inherit the right clip rect.
5900 LayerImpl* root = root_layer(); 5900 LayerImpl* root = root_layer();
5901 LayerImpl* render_surface = AddChildToRoot<LayerImpl>(); 5901 LayerImpl* render_surface = AddChildToRoot<LayerImpl>();
5902 LayerImpl* clip_parent = AddChild<LayerImpl>(render_surface); 5902 LayerImpl* clip_parent = AddChild<LayerImpl>(render_surface);
5903 clip_parent->SetDrawsContent(true); 5903 clip_parent->SetDrawsContent(true);
5904 LayerImpl* intervening = AddChild<LayerImpl>(clip_parent); 5904 LayerImpl* intervening = AddChild<LayerImpl>(clip_parent);
5905 intervening->SetDrawsContent(true); 5905 intervening->SetDrawsContent(true);
5906 LayerImpl* clip_child = AddChild<LayerImpl>(intervening); 5906 LayerImpl* clip_child = AddChild<LayerImpl>(intervening);
5907 clip_child->SetDrawsContent(true); 5907 clip_child->SetDrawsContent(true);
5908 clip_child->SetClipParent(clip_parent); 5908 clip_child->test_properties()->clip_parent = clip_parent;
5909 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 5909 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
5910 clip_children->insert(clip_child); 5910 clip_children->insert(clip_child);
5911 clip_parent->SetClipChildren(clip_children.release()); 5911 clip_parent->test_properties()->clip_children.reset(clip_children.release());
5912 5912
5913 intervening->SetMasksToBounds(true); 5913 intervening->SetMasksToBounds(true);
5914 clip_parent->SetMasksToBounds(true); 5914 clip_parent->SetMasksToBounds(true);
5915 5915
5916 gfx::Transform scale_transform; 5916 gfx::Transform scale_transform;
5917 scale_transform.Scale(2, 2); 5917 scale_transform.Scale(2, 2);
5918 5918
5919 gfx::Transform identity_transform; 5919 gfx::Transform identity_transform;
5920 5920
5921 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 5921 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
5973 LayerImpl* root = root_layer(); 5973 LayerImpl* root = root_layer();
5974 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 5974 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
5975 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent); 5975 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent);
5976 LayerImpl* intervening = AddChild<LayerImpl>(render_surface1); 5976 LayerImpl* intervening = AddChild<LayerImpl>(render_surface1);
5977 LayerImpl* render_surface2 = AddChild<LayerImpl>(intervening); 5977 LayerImpl* render_surface2 = AddChild<LayerImpl>(intervening);
5978 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface2); 5978 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface2);
5979 render_surface1->SetDrawsContent(true); 5979 render_surface1->SetDrawsContent(true);
5980 render_surface2->SetDrawsContent(true); 5980 render_surface2->SetDrawsContent(true);
5981 clip_child->SetDrawsContent(true); 5981 clip_child->SetDrawsContent(true);
5982 5982
5983 clip_child->SetClipParent(clip_parent); 5983 clip_child->test_properties()->clip_parent = clip_parent;
5984 5984
5985 intervening->SetMasksToBounds(true); 5985 intervening->SetMasksToBounds(true);
5986 clip_parent->SetMasksToBounds(true); 5986 clip_parent->SetMasksToBounds(true);
5987 5987
5988 gfx::Transform translation_transform; 5988 gfx::Transform translation_transform;
5989 translation_transform.Translate(2, 2); 5989 translation_transform.Translate(2, 2);
5990 5990
5991 gfx::Transform identity_transform; 5991 gfx::Transform identity_transform;
5992 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 5992 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
5993 gfx::PointF(), gfx::Size(50, 50), true, false, 5993 gfx::PointF(), gfx::Size(50, 50), true, false,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
6062 LayerImpl* root = root_layer(); 6062 LayerImpl* root = root_layer();
6063 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 6063 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
6064 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent); 6064 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent);
6065 LayerImpl* intervening = AddChild<LayerImpl>(render_surface1); 6065 LayerImpl* intervening = AddChild<LayerImpl>(render_surface1);
6066 LayerImpl* render_surface2 = AddChild<LayerImpl>(intervening); 6066 LayerImpl* render_surface2 = AddChild<LayerImpl>(intervening);
6067 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface2); 6067 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface2);
6068 render_surface1->SetDrawsContent(true); 6068 render_surface1->SetDrawsContent(true);
6069 render_surface2->SetDrawsContent(true); 6069 render_surface2->SetDrawsContent(true);
6070 clip_child->SetDrawsContent(true); 6070 clip_child->SetDrawsContent(true);
6071 6071
6072 clip_child->SetClipParent(clip_parent); 6072 clip_child->test_properties()->clip_parent = clip_parent;
6073 6073
6074 intervening->SetMasksToBounds(true); 6074 intervening->SetMasksToBounds(true);
6075 clip_parent->SetMasksToBounds(true); 6075 clip_parent->SetMasksToBounds(true);
6076 intervening->SetScrollClipLayer(clip_parent->id()); 6076 intervening->SetScrollClipLayer(clip_parent->id());
6077 intervening->SetCurrentScrollOffset(gfx::ScrollOffset(3, 3)); 6077 intervening->SetCurrentScrollOffset(gfx::ScrollOffset(3, 3));
6078 6078
6079 gfx::Transform translation_transform; 6079 gfx::Transform translation_transform;
6080 translation_transform.Translate(2, 2); 6080 translation_transform.Translate(2, 2);
6081 6081
6082 gfx::Transform identity_transform; 6082 gfx::Transform identity_transform;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
6148 // + child 6148 // + child
6149 // 6149 //
6150 LayerImpl* root = root_layer(); 6150 LayerImpl* root = root_layer();
6151 LayerImpl* clip_parent = AddChild<LayerImpl>(root); 6151 LayerImpl* clip_parent = AddChild<LayerImpl>(root);
6152 LayerImpl* intervening = AddChild<LayerImpl>(clip_parent); 6152 LayerImpl* intervening = AddChild<LayerImpl>(clip_parent);
6153 LayerImpl* clip_child = AddChild<LayerImpl>(intervening); 6153 LayerImpl* clip_child = AddChild<LayerImpl>(intervening);
6154 LayerImpl* child = AddChild<LayerImpl>(clip_child); 6154 LayerImpl* child = AddChild<LayerImpl>(clip_child);
6155 clip_child->SetDrawsContent(true); 6155 clip_child->SetDrawsContent(true);
6156 child->SetDrawsContent(true); 6156 child->SetDrawsContent(true);
6157 6157
6158 clip_child->SetClipParent(clip_parent); 6158 clip_child->test_properties()->clip_parent = clip_parent;
6159 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 6159 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
6160 clip_children->insert(clip_child); 6160 clip_children->insert(clip_child);
6161 clip_parent->SetClipChildren(clip_children.release()); 6161 clip_parent->test_properties()->clip_children.reset(clip_children.release());
6162 6162
6163 intervening->SetMasksToBounds(true); 6163 intervening->SetMasksToBounds(true);
6164 clip_parent->SetMasksToBounds(true); 6164 clip_parent->SetMasksToBounds(true);
6165 6165
6166 gfx::Transform identity_transform; 6166 gfx::Transform identity_transform;
6167 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 6167 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
6168 gfx::PointF(), gfx::Size(50, 50), true, false, 6168 gfx::PointF(), gfx::Size(50, 50), true, false,
6169 true); 6169 true);
6170 SetLayerPropertiesForTesting(clip_parent, identity_transform, gfx::Point3F(), 6170 SetLayerPropertiesForTesting(clip_parent, identity_transform, gfx::Point3F(),
6171 gfx::PointF(), gfx::Size(40, 40), true, false, 6171 gfx::PointF(), gfx::Size(40, 40), true, false,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
6209 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 6209 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
6210 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent); 6210 LayerImpl* render_surface1 = AddChild<LayerImpl>(clip_parent);
6211 render_surface1->SetDrawsContent(true); 6211 render_surface1->SetDrawsContent(true);
6212 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface1); 6212 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface1);
6213 clip_child->SetDrawsContent(true); 6213 clip_child->SetDrawsContent(true);
6214 LayerImpl* render_surface2 = AddChild<LayerImpl>(clip_parent); 6214 LayerImpl* render_surface2 = AddChild<LayerImpl>(clip_parent);
6215 render_surface2->SetDrawsContent(true); 6215 render_surface2->SetDrawsContent(true);
6216 LayerImpl* non_clip_child = AddChild<LayerImpl>(render_surface2); 6216 LayerImpl* non_clip_child = AddChild<LayerImpl>(render_surface2);
6217 non_clip_child->SetDrawsContent(true); 6217 non_clip_child->SetDrawsContent(true);
6218 6218
6219 clip_child->SetClipParent(clip_parent); 6219 clip_child->test_properties()->clip_parent = clip_parent;
6220 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 6220 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
6221 clip_children->insert(clip_child); 6221 clip_children->insert(clip_child);
6222 clip_parent->SetClipChildren(clip_children.release()); 6222 clip_parent->test_properties()->clip_children.reset(clip_children.release());
6223 6223
6224 clip_parent->SetMasksToBounds(true); 6224 clip_parent->SetMasksToBounds(true);
6225 render_surface1->SetMasksToBounds(true); 6225 render_surface1->SetMasksToBounds(true);
6226 6226
6227 gfx::Transform identity_transform; 6227 gfx::Transform identity_transform;
6228 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 6228 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
6229 gfx::PointF(), gfx::Size(15, 15), true, false, 6229 gfx::PointF(), gfx::Size(15, 15), true, false,
6230 true); 6230 true);
6231 SetLayerPropertiesForTesting(clip_parent, identity_transform, gfx::Point3F(), 6231 SetLayerPropertiesForTesting(clip_parent, identity_transform, gfx::Point3F(),
6232 gfx::PointF(), gfx::Size(10, 10), true, false, 6232 gfx::PointF(), gfx::Size(10, 10), true, false,
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
6612 LayerImpl* root = root_layer(); 6612 LayerImpl* root = root_layer();
6613 LayerImpl* scroll_parent_border = AddChildToRoot<LayerImpl>(); 6613 LayerImpl* scroll_parent_border = AddChildToRoot<LayerImpl>();
6614 LayerImpl* scroll_parent_clip = AddChild<LayerImpl>(scroll_parent_border); 6614 LayerImpl* scroll_parent_clip = AddChild<LayerImpl>(scroll_parent_border);
6615 LayerImpl* scroll_parent = AddChild<LayerImpl>(scroll_parent_clip); 6615 LayerImpl* scroll_parent = AddChild<LayerImpl>(scroll_parent_clip);
6616 LayerImpl* scroll_child = AddChild<LayerImpl>(root); 6616 LayerImpl* scroll_child = AddChild<LayerImpl>(root);
6617 6617
6618 scroll_parent->SetDrawsContent(true); 6618 scroll_parent->SetDrawsContent(true);
6619 scroll_child->SetDrawsContent(true); 6619 scroll_child->SetDrawsContent(true);
6620 scroll_parent_clip->SetMasksToBounds(true); 6620 scroll_parent_clip->SetMasksToBounds(true);
6621 6621
6622 scroll_child->SetScrollParent(scroll_parent); 6622 scroll_child->test_properties()->scroll_parent = scroll_parent;
6623 std::unique_ptr<std::set<LayerImpl*>> scroll_children( 6623 std::unique_ptr<std::set<LayerImpl*>> scroll_children(
6624 new std::set<LayerImpl*>); 6624 new std::set<LayerImpl*>);
6625 scroll_children->insert(scroll_child); 6625 scroll_children->insert(scroll_child);
6626 scroll_parent->SetScrollChildren(scroll_children.release()); 6626 scroll_parent->test_properties()->scroll_children.reset(
6627 scroll_children.release());
6627 6628
6628 gfx::Transform identity_transform; 6629 gfx::Transform identity_transform;
6629 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 6630 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
6630 gfx::PointF(), gfx::Size(50, 50), true, false, 6631 gfx::PointF(), gfx::Size(50, 50), true, false,
6631 true); 6632 true);
6632 SetLayerPropertiesForTesting(scroll_parent_border, identity_transform, 6633 SetLayerPropertiesForTesting(scroll_parent_border, identity_transform,
6633 gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40), 6634 gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40),
6634 true, false, false); 6635 true, false, false);
6635 SetLayerPropertiesForTesting(scroll_parent_clip, identity_transform, 6636 SetLayerPropertiesForTesting(scroll_parent_clip, identity_transform,
6636 gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30), 6637 gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30),
(...skipping 18 matching lines...) Expand all
6655 // target is different from its scroll parent's target. 6656 // target is different from its scroll parent's target.
6656 LayerImpl* root = root_layer(); 6657 LayerImpl* root = root_layer();
6657 LayerImpl* scroll_child_target = AddChildToRoot<LayerImpl>(); 6658 LayerImpl* scroll_child_target = AddChildToRoot<LayerImpl>();
6658 LayerImpl* scroll_child = AddChild<LayerImpl>(scroll_child_target); 6659 LayerImpl* scroll_child = AddChild<LayerImpl>(scroll_child_target);
6659 LayerImpl* scroll_parent_target = AddChild<LayerImpl>(scroll_child_target); 6660 LayerImpl* scroll_parent_target = AddChild<LayerImpl>(scroll_child_target);
6660 LayerImpl* scroll_parent = AddChild<LayerImpl>(scroll_parent_target); 6661 LayerImpl* scroll_parent = AddChild<LayerImpl>(scroll_parent_target);
6661 6662
6662 scroll_parent->SetDrawsContent(true); 6663 scroll_parent->SetDrawsContent(true);
6663 scroll_child->SetDrawsContent(true); 6664 scroll_child->SetDrawsContent(true);
6664 6665
6665 scroll_child->SetScrollParent(scroll_parent); 6666 scroll_child->test_properties()->scroll_parent = scroll_parent;
6666 std::unique_ptr<std::set<LayerImpl*>> scroll_children( 6667 std::unique_ptr<std::set<LayerImpl*>> scroll_children(
6667 new std::set<LayerImpl*>); 6668 new std::set<LayerImpl*>);
6668 scroll_children->insert(scroll_child); 6669 scroll_children->insert(scroll_child);
6669 scroll_parent->SetScrollChildren(scroll_children.release()); 6670 scroll_parent->test_properties()->scroll_children.reset(
6671 scroll_children.release());
6670 6672
6671 gfx::Transform identity_transform; 6673 gfx::Transform identity_transform;
6672 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 6674 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
6673 gfx::PointF(), gfx::Size(50, 50), true, false, 6675 gfx::PointF(), gfx::Size(50, 50), true, false,
6674 true); 6676 true);
6675 SetLayerPropertiesForTesting(scroll_child_target, identity_transform, 6677 SetLayerPropertiesForTesting(scroll_child_target, identity_transform,
6676 gfx::Point3F(), gfx::PointF(), gfx::Size(50, 50), 6678 gfx::Point3F(), gfx::PointF(), gfx::Size(50, 50),
6677 true, false, true); 6679 true, false, true);
6678 SetLayerPropertiesForTesting(scroll_child, identity_transform, gfx::Point3F(), 6680 SetLayerPropertiesForTesting(scroll_child, identity_transform, gfx::Point3F(),
6679 gfx::PointF(), gfx::Size(50, 50), true, false, 6681 gfx::PointF(), gfx::Size(50, 50), true, false,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
6763 LayerImpl* scroll_parent_border = AddChild<LayerImpl>(root); 6765 LayerImpl* scroll_parent_border = AddChild<LayerImpl>(root);
6764 LayerImpl* scroll_parent_clip = AddChild<LayerImpl>(scroll_parent_border); 6766 LayerImpl* scroll_parent_clip = AddChild<LayerImpl>(scroll_parent_border);
6765 LayerImpl* scroll_parent = AddChild<LayerImpl>(scroll_parent_clip); 6767 LayerImpl* scroll_parent = AddChild<LayerImpl>(scroll_parent_clip);
6766 LayerImpl* scroll_child = AddChild<LayerImpl>(root); 6768 LayerImpl* scroll_child = AddChild<LayerImpl>(root);
6767 6769
6768 scroll_parent->SetDrawsContent(true); 6770 scroll_parent->SetDrawsContent(true);
6769 scroll_child->SetDrawsContent(true); 6771 scroll_child->SetDrawsContent(true);
6770 6772
6771 scroll_parent_clip->SetMasksToBounds(true); 6773 scroll_parent_clip->SetMasksToBounds(true);
6772 6774
6773 scroll_child->SetScrollParent(scroll_parent); 6775 scroll_child->test_properties()->scroll_parent = scroll_parent;
6774 std::unique_ptr<std::set<LayerImpl*>> scroll_children( 6776 std::unique_ptr<std::set<LayerImpl*>> scroll_children(
6775 new std::set<LayerImpl*>); 6777 new std::set<LayerImpl*>);
6776 scroll_children->insert(scroll_child); 6778 scroll_children->insert(scroll_child);
6777 scroll_parent->SetScrollChildren(scroll_children.release()); 6779 scroll_parent->test_properties()->scroll_children.reset(
6780 scroll_children.release());
6778 6781
6779 gfx::Transform identity_transform; 6782 gfx::Transform identity_transform;
6780 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 6783 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
6781 gfx::PointF(), gfx::Size(50, 50), true, false, 6784 gfx::PointF(), gfx::Size(50, 50), true, false,
6782 true); 6785 true);
6783 SetLayerPropertiesForTesting(scroll_parent_border, identity_transform, 6786 SetLayerPropertiesForTesting(scroll_parent_border, identity_transform,
6784 gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40), 6787 gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40),
6785 true, false, false); 6788 true, false, false);
6786 SetLayerPropertiesForTesting(scroll_parent_clip, identity_transform, 6789 SetLayerPropertiesForTesting(scroll_parent_clip, identity_transform,
6787 gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30), 6790 gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30),
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
6824 AddChild<LayerImpl>(scroll_grandparent_border); 6827 AddChild<LayerImpl>(scroll_grandparent_border);
6825 LayerImpl* scroll_grandparent = AddChild<LayerImpl>(scroll_grandparent_clip); 6828 LayerImpl* scroll_grandparent = AddChild<LayerImpl>(scroll_grandparent_clip);
6826 6829
6827 scroll_parent->SetDrawsContent(true); 6830 scroll_parent->SetDrawsContent(true);
6828 scroll_grandparent->SetDrawsContent(true); 6831 scroll_grandparent->SetDrawsContent(true);
6829 scroll_child->SetDrawsContent(true); 6832 scroll_child->SetDrawsContent(true);
6830 6833
6831 scroll_parent_clip->SetMasksToBounds(true); 6834 scroll_parent_clip->SetMasksToBounds(true);
6832 scroll_grandparent_clip->SetMasksToBounds(true); 6835 scroll_grandparent_clip->SetMasksToBounds(true);
6833 6836
6834 scroll_child->SetScrollParent(scroll_parent); 6837 scroll_child->test_properties()->scroll_parent = scroll_parent;
6835 std::unique_ptr<std::set<LayerImpl*>> scroll_children( 6838 std::unique_ptr<std::set<LayerImpl*>> scroll_children(
6836 new std::set<LayerImpl*>); 6839 new std::set<LayerImpl*>);
6837 scroll_children->insert(scroll_child); 6840 scroll_children->insert(scroll_child);
6838 scroll_parent->SetScrollChildren(scroll_children.release()); 6841 scroll_parent->test_properties()->scroll_children.reset(
6842 scroll_children.release());
6839 6843
6840 scroll_parent_border->SetScrollParent(scroll_grandparent); 6844 scroll_parent_border->test_properties()->scroll_parent = scroll_grandparent;
6841 scroll_children.reset(new std::set<LayerImpl*>); 6845 scroll_children.reset(new std::set<LayerImpl*>);
6842 scroll_children->insert(scroll_parent_border); 6846 scroll_children->insert(scroll_parent_border);
6843 scroll_grandparent->SetScrollChildren(scroll_children.release()); 6847 scroll_grandparent->test_properties()->scroll_children.reset(
6848 scroll_children.release());
6844 6849
6845 gfx::Transform identity_transform; 6850 gfx::Transform identity_transform;
6846 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 6851 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
6847 gfx::PointF(), gfx::Size(50, 50), true, false, 6852 gfx::PointF(), gfx::Size(50, 50), true, false,
6848 true); 6853 true);
6849 SetLayerPropertiesForTesting(scroll_grandparent_border, identity_transform, 6854 SetLayerPropertiesForTesting(scroll_grandparent_border, identity_transform,
6850 gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40), 6855 gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40),
6851 true, false, false); 6856 true, false, false);
6852 SetLayerPropertiesForTesting(scroll_grandparent_clip, identity_transform, 6857 SetLayerPropertiesForTesting(scroll_grandparent_clip, identity_transform,
6853 gfx::Point3F(), gfx::PointF(), gfx::Size(20, 20), 6858 gfx::Point3F(), gfx::PointF(), gfx::Size(20, 20),
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
6914 LayerImpl* render_surface1 = AddChild<LayerImpl>(scroll_grandparent); 6919 LayerImpl* render_surface1 = AddChild<LayerImpl>(scroll_grandparent);
6915 6920
6916 scroll_parent->SetDrawsContent(true); 6921 scroll_parent->SetDrawsContent(true);
6917 render_surface1->SetDrawsContent(true); 6922 render_surface1->SetDrawsContent(true);
6918 scroll_grandparent->SetDrawsContent(true); 6923 scroll_grandparent->SetDrawsContent(true);
6919 render_surface2->SetDrawsContent(true); 6924 render_surface2->SetDrawsContent(true);
6920 6925
6921 scroll_parent_clip->SetMasksToBounds(true); 6926 scroll_parent_clip->SetMasksToBounds(true);
6922 scroll_grandparent_clip->SetMasksToBounds(true); 6927 scroll_grandparent_clip->SetMasksToBounds(true);
6923 6928
6924 scroll_child->SetScrollParent(scroll_parent); 6929 scroll_child->test_properties()->scroll_parent = scroll_parent;
6925 std::unique_ptr<std::set<LayerImpl*>> scroll_children( 6930 std::unique_ptr<std::set<LayerImpl*>> scroll_children(
6926 new std::set<LayerImpl*>); 6931 new std::set<LayerImpl*>);
6927 scroll_children->insert(scroll_child); 6932 scroll_children->insert(scroll_child);
6928 scroll_parent->SetScrollChildren(scroll_children.release()); 6933 scroll_parent->test_properties()->scroll_children.reset(
6934 scroll_children.release());
6929 6935
6930 scroll_parent_border->SetScrollParent(scroll_grandparent); 6936 scroll_parent_border->test_properties()->scroll_parent = scroll_grandparent;
6931 scroll_children.reset(new std::set<LayerImpl*>); 6937 scroll_children.reset(new std::set<LayerImpl*>);
6932 scroll_children->insert(scroll_parent_border); 6938 scroll_children->insert(scroll_parent_border);
6933 scroll_grandparent->SetScrollChildren(scroll_children.release()); 6939 scroll_grandparent->test_properties()->scroll_children.reset(
6940 scroll_children.release());
6934 6941
6935 gfx::Transform identity_transform; 6942 gfx::Transform identity_transform;
6936 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 6943 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
6937 gfx::PointF(), gfx::Size(50, 50), true, false, 6944 gfx::PointF(), gfx::Size(50, 50), true, false,
6938 true); 6945 true);
6939 SetLayerPropertiesForTesting(scroll_grandparent_border, identity_transform, 6946 SetLayerPropertiesForTesting(scroll_grandparent_border, identity_transform,
6940 gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40), 6947 gfx::Point3F(), gfx::PointF(), gfx::Size(40, 40),
6941 true, false, false); 6948 true, false, false);
6942 SetLayerPropertiesForTesting(scroll_grandparent_clip, identity_transform, 6949 SetLayerPropertiesForTesting(scroll_grandparent_clip, identity_transform,
6943 gfx::Point3F(), gfx::PointF(), gfx::Size(20, 20), 6950 gfx::Point3F(), gfx::PointF(), gfx::Size(20, 20),
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after
8640 ExecuteCalculateDrawProperties(root); 8647 ExecuteCalculateDrawProperties(root);
8641 EXPECT_EQ(gfx::Rect(5, 5, 5, 5), child->visible_layer_rect()); 8648 EXPECT_EQ(gfx::Rect(5, 5, 5, 5), child->visible_layer_rect());
8642 } 8649 }
8643 8650
8644 TEST_F(LayerTreeHostCommonTest, UpdateScrollChildPosition) { 8651 TEST_F(LayerTreeHostCommonTest, UpdateScrollChildPosition) {
8645 LayerImpl* root = root_layer(); 8652 LayerImpl* root = root_layer();
8646 LayerImpl* scroll_parent = AddChild<LayerImpl>(root); 8653 LayerImpl* scroll_parent = AddChild<LayerImpl>(root);
8647 LayerImpl* scroll_child = AddChild<LayerImpl>(scroll_parent); 8654 LayerImpl* scroll_child = AddChild<LayerImpl>(scroll_parent);
8648 8655
8649 scroll_child->SetDrawsContent(true); 8656 scroll_child->SetDrawsContent(true);
8650 scroll_child->SetScrollParent(scroll_parent); 8657 scroll_child->test_properties()->scroll_parent = scroll_parent;
8651 std::unique_ptr<std::set<LayerImpl*>> scroll_children( 8658 std::unique_ptr<std::set<LayerImpl*>> scroll_children(
8652 new std::set<LayerImpl*>); 8659 new std::set<LayerImpl*>);
8653 scroll_children->insert(scroll_child); 8660 scroll_children->insert(scroll_child);
8654 scroll_parent->SetScrollChildren(scroll_children.release()); 8661 scroll_parent->test_properties()->scroll_children.reset(
8662 scroll_children.release());
8655 scroll_parent->SetDrawsContent(true); 8663 scroll_parent->SetDrawsContent(true);
8656 8664
8657 gfx::Transform identity_transform; 8665 gfx::Transform identity_transform;
8658 gfx::Transform scale; 8666 gfx::Transform scale;
8659 scale.Scale(2.f, 2.f); 8667 scale.Scale(2.f, 2.f);
8660 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(), 8668 SetLayerPropertiesForTesting(root, identity_transform, gfx::Point3F(),
8661 gfx::PointF(), gfx::Size(50, 50), true, false, 8669 gfx::PointF(), gfx::Size(50, 50), true, false,
8662 true); 8670 true);
8663 SetLayerPropertiesForTesting(scroll_child, scale, gfx::Point3F(), 8671 SetLayerPropertiesForTesting(scroll_child, scale, gfx::Point3F(),
8664 gfx::PointF(), gfx::Size(40, 40), true, false, 8672 gfx::PointF(), gfx::Size(40, 40), true, false,
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
9315 LayerImpl* render_surface = 9323 LayerImpl* render_surface =
9316 AddChild<LayerImpl>(between_clip_parent_and_child); 9324 AddChild<LayerImpl>(between_clip_parent_and_child);
9317 LayerImpl* test_layer = AddChild<LayerImpl>(render_surface); 9325 LayerImpl* test_layer = AddChild<LayerImpl>(render_surface);
9318 9326
9319 const gfx::Transform identity_matrix; 9327 const gfx::Transform identity_matrix;
9320 gfx::Transform translate; 9328 gfx::Transform translate;
9321 translate.Translate(2.0, 2.0); 9329 translate.Translate(2.0, 2.0);
9322 9330
9323 clip_parent->SetMasksToBounds(true); 9331 clip_parent->SetMasksToBounds(true);
9324 test_layer->SetDrawsContent(true); 9332 test_layer->SetDrawsContent(true);
9325 render_surface->SetClipParent(clip_parent); 9333 render_surface->test_properties()->clip_parent = clip_parent;
9326 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9334 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9327 clip_children->insert(render_surface); 9335 clip_children->insert(render_surface);
9328 clip_parent->SetClipChildren(clip_children.release()); 9336 clip_parent->test_properties()->clip_children.reset(clip_children.release());
9329 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9337 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9330 gfx::PointF(), gfx::Size(30, 30), true, false, 9338 gfx::PointF(), gfx::Size(30, 30), true, false,
9331 true); 9339 true);
9332 SetLayerPropertiesForTesting(clip_parent, translate, gfx::Point3F(), 9340 SetLayerPropertiesForTesting(clip_parent, translate, gfx::Point3F(),
9333 gfx::PointF(), gfx::Size(30, 30), true, false, 9341 gfx::PointF(), gfx::Size(30, 30), true, false,
9334 false); 9342 false);
9335 SetLayerPropertiesForTesting(between_clip_parent_and_child, translate, 9343 SetLayerPropertiesForTesting(between_clip_parent_and_child, translate,
9336 gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30), 9344 gfx::Point3F(), gfx::PointF(), gfx::Size(30, 30),
9337 true, false, false); 9345 true, false, false);
9338 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(), 9346 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(),
(...skipping 19 matching lines...) Expand all
9358 LayerImpl* root = root_layer(); 9366 LayerImpl* root = root_layer();
9359 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 9367 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
9360 LayerImpl* render_surface = AddChild<LayerImpl>(clip_parent); 9368 LayerImpl* render_surface = AddChild<LayerImpl>(clip_parent);
9361 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface); 9369 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface);
9362 LayerImpl* child = AddChild<LayerImpl>(render_surface); 9370 LayerImpl* child = AddChild<LayerImpl>(render_surface);
9363 9371
9364 const gfx::Transform identity_matrix; 9372 const gfx::Transform identity_matrix;
9365 9373
9366 clip_child->SetDrawsContent(true); 9374 clip_child->SetDrawsContent(true);
9367 child->SetDrawsContent(true); 9375 child->SetDrawsContent(true);
9368 clip_child->SetClipParent(clip_parent); 9376 clip_child->test_properties()->clip_parent = clip_parent;
9369 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9377 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9370 clip_children->insert(clip_child); 9378 clip_children->insert(clip_child);
9371 clip_parent->SetClipChildren(clip_children.release()); 9379 clip_parent->test_properties()->clip_children.reset(clip_children.release());
9372 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9380 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9373 gfx::PointF(), gfx::Size(30, 10), true, false, 9381 gfx::PointF(), gfx::Size(30, 10), true, false,
9374 true); 9382 true);
9375 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 9383 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
9376 gfx::PointF(), gfx::Size(30, 30), true, false, 9384 gfx::PointF(), gfx::Size(30, 30), true, false,
9377 false); 9385 false);
9378 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(), 9386 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(),
9379 gfx::PointF(), gfx::Size(10, 15), true, false, 9387 gfx::PointF(), gfx::Size(10, 15), true, false,
9380 true); 9388 true);
9381 SetLayerPropertiesForTesting(clip_child, identity_matrix, gfx::Point3F(), 9389 SetLayerPropertiesForTesting(clip_child, identity_matrix, gfx::Point3F(),
(...skipping 16 matching lines...) Expand all
9398 LayerImpl* clip_child = AddChild<LayerImpl>(test_layer1); 9406 LayerImpl* clip_child = AddChild<LayerImpl>(test_layer1);
9399 LayerImpl* test_layer2 = AddChild<LayerImpl>(clip_child); 9407 LayerImpl* test_layer2 = AddChild<LayerImpl>(clip_child);
9400 9408
9401 const gfx::Transform identity_matrix; 9409 const gfx::Transform identity_matrix;
9402 root->SetMasksToBounds(true); 9410 root->SetMasksToBounds(true);
9403 render_surface->SetMasksToBounds(true); 9411 render_surface->SetMasksToBounds(true);
9404 render_surface->SetDrawsContent(true); 9412 render_surface->SetDrawsContent(true);
9405 clip_child->SetDrawsContent(true); 9413 clip_child->SetDrawsContent(true);
9406 test_layer1->SetDrawsContent(true); 9414 test_layer1->SetDrawsContent(true);
9407 test_layer2->SetDrawsContent(true); 9415 test_layer2->SetDrawsContent(true);
9408 clip_child->SetClipParent(clip_parent); 9416 clip_child->test_properties()->clip_parent = clip_parent;
9409 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9417 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9410 clip_children->insert(clip_child); 9418 clip_children->insert(clip_child);
9411 clip_parent->SetClipChildren(clip_children.release()); 9419 clip_parent->test_properties()->clip_children.reset(clip_children.release());
9412 9420
9413 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9421 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9414 gfx::PointF(), gfx::Size(30, 30), true, false, 9422 gfx::PointF(), gfx::Size(30, 30), true, false,
9415 true); 9423 true);
9416 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 9424 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
9417 gfx::PointF(), gfx::Size(30, 30), true, false, 9425 gfx::PointF(), gfx::Size(30, 30), true, false,
9418 false); 9426 false);
9419 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(), 9427 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(),
9420 gfx::PointF(), gfx::Size(50, 50), true, false, 9428 gfx::PointF(), gfx::Size(50, 50), true, false,
9421 true); 9429 true);
(...skipping 19 matching lines...) Expand all
9441 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 9449 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
9442 LayerImpl* render_surface = AddChild<LayerImpl>(clip_parent); 9450 LayerImpl* render_surface = AddChild<LayerImpl>(clip_parent);
9443 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface); 9451 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface);
9444 9452
9445 const gfx::Transform identity_matrix; 9453 const gfx::Transform identity_matrix;
9446 clip_parent->SetDrawsContent(true); 9454 clip_parent->SetDrawsContent(true);
9447 render_surface->SetMasksToBounds(true); 9455 render_surface->SetMasksToBounds(true);
9448 render_surface->SetDrawsContent(true); 9456 render_surface->SetDrawsContent(true);
9449 clip_child->SetDrawsContent(true); 9457 clip_child->SetDrawsContent(true);
9450 9458
9451 clip_child->SetClipParent(clip_parent); 9459 clip_child->test_properties()->clip_parent = clip_parent;
9452 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9460 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9453 clip_children->insert(clip_child); 9461 clip_children->insert(clip_child);
9454 clip_parent->SetClipChildren(clip_children.release()); 9462 clip_parent->test_properties()->clip_children.reset(clip_children.release());
9455 9463
9456 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9464 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9457 gfx::PointF(), gfx::Size(50, 50), true, false, 9465 gfx::PointF(), gfx::Size(50, 50), true, false,
9458 true); 9466 true);
9459 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 9467 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
9460 gfx::PointF(), gfx::Size(50, 50), true, false, 9468 gfx::PointF(), gfx::Size(50, 50), true, false,
9461 false); 9469 false);
9462 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(), 9470 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(),
9463 gfx::PointF(), gfx::Size(30, 30), true, false, 9471 gfx::PointF(), gfx::Size(30, 30), true, false,
9464 true); 9472 true);
(...skipping 20 matching lines...) Expand all
9485 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent); 9493 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent);
9486 LayerImpl* unclipped_desc_surface2 = 9494 LayerImpl* unclipped_desc_surface2 =
9487 AddChild<LayerImpl>(unclipped_desc_surface); 9495 AddChild<LayerImpl>(unclipped_desc_surface);
9488 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface2); 9496 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface2);
9489 LayerImpl* clipped_surface = AddChild<LayerImpl>(clip_child); 9497 LayerImpl* clipped_surface = AddChild<LayerImpl>(clip_child);
9490 9498
9491 unclipped_surface->SetDrawsContent(true); 9499 unclipped_surface->SetDrawsContent(true);
9492 unclipped_desc_surface->SetDrawsContent(true); 9500 unclipped_desc_surface->SetDrawsContent(true);
9493 unclipped_desc_surface2->SetDrawsContent(true); 9501 unclipped_desc_surface2->SetDrawsContent(true);
9494 clipped_surface->SetDrawsContent(true); 9502 clipped_surface->SetDrawsContent(true);
9495 clip_child->SetClipParent(clip_parent); 9503 clip_child->test_properties()->clip_parent = clip_parent;
9496 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9504 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9497 clip_children->insert(clip_child); 9505 clip_children->insert(clip_child);
9498 clip_parent->SetClipChildren(clip_children.release()); 9506 clip_parent->test_properties()->clip_children.reset(clip_children.release());
9499 9507
9500 gfx::Transform identity_matrix; 9508 gfx::Transform identity_matrix;
9501 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9509 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9502 gfx::PointF(), gfx::Size(80, 80), true, false, 9510 gfx::PointF(), gfx::Size(80, 80), true, false,
9503 true); 9511 true);
9504 SetLayerPropertiesForTesting(unclipped_surface, identity_matrix, 9512 SetLayerPropertiesForTesting(unclipped_surface, identity_matrix,
9505 gfx::Point3F(), gfx::PointF(), gfx::Size(50, 50), 9513 gfx::Point3F(), gfx::PointF(), gfx::Size(50, 50),
9506 true, false, true); 9514 true, false, true);
9507 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 9515 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
9508 gfx::PointF(), gfx::Size(50, 50), true, false, 9516 gfx::PointF(), gfx::Size(50, 50), true, false,
(...skipping 30 matching lines...) Expand all
9539 // clips between the clip parent's target and clip child's target. 9547 // clips between the clip parent's target and clip child's target.
9540 LayerImpl* root = root_layer(); 9548 LayerImpl* root = root_layer();
9541 LayerImpl* surface = AddChildToRoot<LayerImpl>(); 9549 LayerImpl* surface = AddChildToRoot<LayerImpl>();
9542 LayerImpl* clip_layer = AddChild<LayerImpl>(surface); 9550 LayerImpl* clip_layer = AddChild<LayerImpl>(surface);
9543 LayerImpl* clip_parent = AddChild<LayerImpl>(clip_layer); 9551 LayerImpl* clip_parent = AddChild<LayerImpl>(clip_layer);
9544 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent); 9552 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent);
9545 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface); 9553 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface);
9546 9554
9547 clip_child->SetDrawsContent(true); 9555 clip_child->SetDrawsContent(true);
9548 unclipped_desc_surface->SetDrawsContent(true); 9556 unclipped_desc_surface->SetDrawsContent(true);
9549 clip_child->SetClipParent(clip_parent); 9557 clip_child->test_properties()->clip_parent = clip_parent;
9550 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9558 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9551 clip_children->insert(clip_child); 9559 clip_children->insert(clip_child);
9552 clip_parent->SetClipChildren(clip_children.release()); 9560 clip_parent->test_properties()->clip_children.reset(clip_children.release());
9553 9561
9554 gfx::Transform identity_matrix; 9562 gfx::Transform identity_matrix;
9555 gfx::Transform translate; 9563 gfx::Transform translate;
9556 translate.Translate(10, 10); 9564 translate.Translate(10, 10);
9557 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9565 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9558 gfx::PointF(), gfx::Size(100, 100), true, false, 9566 gfx::PointF(), gfx::Size(100, 100), true, false,
9559 true); 9567 true);
9560 SetLayerPropertiesForTesting(surface, identity_matrix, gfx::Point3F(), 9568 SetLayerPropertiesForTesting(surface, identity_matrix, gfx::Point3F(),
9561 gfx::PointF(), gfx::Size(100, 100), true, false, 9569 gfx::PointF(), gfx::Size(100, 100), true, false,
9562 true); 9570 true);
(...skipping 21 matching lines...) Expand all
9584 TEST_F(LayerTreeHostCommonTest, VisibleRectForDescendantOfScaledSurface) { 9592 TEST_F(LayerTreeHostCommonTest, VisibleRectForDescendantOfScaledSurface) {
9585 LayerImpl* root = root_layer(); 9593 LayerImpl* root = root_layer();
9586 LayerImpl* surface = AddChildToRoot<LayerImpl>(); 9594 LayerImpl* surface = AddChildToRoot<LayerImpl>();
9587 LayerImpl* clip_layer = AddChild<LayerImpl>(surface); 9595 LayerImpl* clip_layer = AddChild<LayerImpl>(surface);
9588 LayerImpl* clip_parent = AddChild<LayerImpl>(clip_layer); 9596 LayerImpl* clip_parent = AddChild<LayerImpl>(clip_layer);
9589 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent); 9597 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent);
9590 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface); 9598 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface);
9591 9599
9592 clip_child->SetDrawsContent(true); 9600 clip_child->SetDrawsContent(true);
9593 unclipped_desc_surface->SetDrawsContent(true); 9601 unclipped_desc_surface->SetDrawsContent(true);
9594 clip_child->SetClipParent(clip_parent); 9602 clip_child->test_properties()->clip_parent = clip_parent;
9595 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9603 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9596 clip_children->insert(clip_child); 9604 clip_children->insert(clip_child);
9597 clip_parent->SetClipChildren(clip_children.release()); 9605 clip_parent->test_properties()->clip_children.reset(clip_children.release());
9598 9606
9599 gfx::Transform identity_matrix; 9607 gfx::Transform identity_matrix;
9600 gfx::Transform scale; 9608 gfx::Transform scale;
9601 scale.Scale(2, 2); 9609 scale.Scale(2, 2);
9602 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9610 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9603 gfx::PointF(), gfx::Size(100, 100), true, false, 9611 gfx::PointF(), gfx::Size(100, 100), true, false,
9604 true); 9612 true);
9605 SetLayerPropertiesForTesting(surface, scale, gfx::Point3F(), gfx::PointF(), 9613 SetLayerPropertiesForTesting(surface, scale, gfx::Point3F(), gfx::PointF(),
9606 gfx::Size(100, 100), true, false, true); 9614 gfx::Size(100, 100), true, false, true);
9607 SetLayerPropertiesForTesting(clip_layer, identity_matrix, gfx::Point3F(), 9615 SetLayerPropertiesForTesting(clip_layer, identity_matrix, gfx::Point3F(),
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
9655 LayerImpl* root = root_layer(); 9663 LayerImpl* root = root_layer();
9656 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>(); 9664 LayerImpl* clip_parent = AddChildToRoot<LayerImpl>();
9657 LayerImpl* render_surface = AddChild<LayerImpl>(clip_parent); 9665 LayerImpl* render_surface = AddChild<LayerImpl>(clip_parent);
9658 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface); 9666 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface);
9659 9667
9660 const gfx::Transform identity_matrix; 9668 const gfx::Transform identity_matrix;
9661 clip_parent->SetMasksToBounds(true); 9669 clip_parent->SetMasksToBounds(true);
9662 render_surface->SetMasksToBounds(true); 9670 render_surface->SetMasksToBounds(true);
9663 render_surface->SetDrawsContent(true); 9671 render_surface->SetDrawsContent(true);
9664 clip_child->SetDrawsContent(true); 9672 clip_child->SetDrawsContent(true);
9665 clip_child->SetClipParent(clip_parent); 9673 clip_child->test_properties()->clip_parent = clip_parent;
9666 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9674 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9667 clip_children->insert(clip_child); 9675 clip_children->insert(clip_child);
9668 clip_parent->SetClipChildren(clip_children.release()); 9676 clip_parent->test_properties()->clip_children.reset(clip_children.release());
9669 9677
9670 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9678 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9671 gfx::PointF(), gfx::Size(30, 30), true, false, 9679 gfx::PointF(), gfx::Size(30, 30), true, false,
9672 true); 9680 true);
9673 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(), 9681 SetLayerPropertiesForTesting(clip_parent, identity_matrix, gfx::Point3F(),
9674 gfx::PointF(10.f, 10.f), gfx::Size(40, 40), true, 9682 gfx::PointF(10.f, 10.f), gfx::Size(40, 40), true,
9675 false, false); 9683 false, false);
9676 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(), 9684 SetLayerPropertiesForTesting(render_surface, identity_matrix, gfx::Point3F(),
9677 gfx::PointF(), gfx::Size(50, 50), true, false, 9685 gfx::PointF(), gfx::Size(50, 50), true, false,
9678 true); 9686 true);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
9739 EXPECT_FALSE(test->IsHidden()); 9747 EXPECT_FALSE(test->IsHidden());
9740 } 9748 }
9741 9749
9742 TEST_F(LayerTreeHostCommonTest, TwoUnclippedRenderSurfaces) { 9750 TEST_F(LayerTreeHostCommonTest, TwoUnclippedRenderSurfaces) {
9743 LayerImpl* root = root_layer(); 9751 LayerImpl* root = root_layer();
9744 LayerImpl* render_surface1 = AddChild<LayerImpl>(root); 9752 LayerImpl* render_surface1 = AddChild<LayerImpl>(root);
9745 LayerImpl* render_surface2 = AddChild<LayerImpl>(render_surface1); 9753 LayerImpl* render_surface2 = AddChild<LayerImpl>(render_surface1);
9746 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface2); 9754 LayerImpl* clip_child = AddChild<LayerImpl>(render_surface2);
9747 9755
9748 const gfx::Transform identity_matrix; 9756 const gfx::Transform identity_matrix;
9749 clip_child->SetClipParent(root); 9757 clip_child->test_properties()->clip_parent = root;
9750 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>); 9758 std::unique_ptr<std::set<LayerImpl*>> clip_children(new std::set<LayerImpl*>);
9751 clip_children->insert(clip_child); 9759 clip_children->insert(clip_child);
9752 root->SetClipChildren(clip_children.release()); 9760 root->test_properties()->clip_children.reset(clip_children.release());
9753 root->SetMasksToBounds(true); 9761 root->SetMasksToBounds(true);
9754 render_surface1->SetDrawsContent(true); 9762 render_surface1->SetDrawsContent(true);
9755 render_surface2->SetDrawsContent(true); 9763 render_surface2->SetDrawsContent(true);
9756 9764
9757 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(), 9765 SetLayerPropertiesForTesting(root, identity_matrix, gfx::Point3F(),
9758 gfx::PointF(), gfx::Size(30, 30), true, false, 9766 gfx::PointF(), gfx::Size(30, 30), true, false,
9759 true); 9767 true);
9760 SetLayerPropertiesForTesting(render_surface1, identity_matrix, gfx::Point3F(), 9768 SetLayerPropertiesForTesting(render_surface1, identity_matrix, gfx::Point3F(),
9761 gfx::PointF(10, 10), gfx::Size(30, 30), true, 9769 gfx::PointF(10, 10), gfx::Size(30, 30), true,
9762 false, true); 9770 false, true);
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
10126 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); 10134 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index());
10127 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); 10135 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index());
10128 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); 10136 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index());
10129 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); 10137 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index());
10130 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); 10138 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index());
10131 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); 10139 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index());
10132 } 10140 }
10133 10141
10134 } // namespace 10142 } // namespace
10135 } // namespace cc 10143 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.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