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

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

Issue 2245463002: cc : Cache trasnforms to target even when target is a descendant (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test Created 4 years, 4 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/property_tree.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 9002 matching lines...) Expand 10 before | Expand all | Expand 10 after
9013 LayerImpl* root = root_layer_for_testing(); 9013 LayerImpl* root = root_layer_for_testing();
9014 LayerImpl* surface = AddChildToRoot<LayerImpl>(); 9014 LayerImpl* surface = AddChildToRoot<LayerImpl>();
9015 LayerImpl* clip_layer = AddChild<LayerImpl>(surface); 9015 LayerImpl* clip_layer = AddChild<LayerImpl>(surface);
9016 LayerImpl* clip_parent = AddChild<LayerImpl>(clip_layer); 9016 LayerImpl* clip_parent = AddChild<LayerImpl>(clip_layer);
9017 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent); 9017 LayerImpl* unclipped_desc_surface = AddChild<LayerImpl>(clip_parent);
9018 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface); 9018 LayerImpl* clip_child = AddChild<LayerImpl>(unclipped_desc_surface);
9019 9019
9020 gfx::Transform translate; 9020 gfx::Transform translate;
9021 translate.Translate(10, 10); 9021 translate.Translate(10, 10);
9022 9022
9023 gfx::Transform rotate;
9024 rotate.RotateAboutXAxis(10);
9025
9023 root->SetBounds(gfx::Size(100, 100)); 9026 root->SetBounds(gfx::Size(100, 100));
9024 surface->SetBounds(gfx::Size(100, 100)); 9027 surface->SetBounds(gfx::Size(100, 100));
9025 surface->SetMasksToBounds(true); 9028 surface->SetMasksToBounds(true);
9026 surface->test_properties()->force_render_surface = true; 9029 surface->test_properties()->force_render_surface = true;
9030 surface->SetTransform(rotate);
9027 clip_layer->SetBounds(gfx::Size(20, 20)); 9031 clip_layer->SetBounds(gfx::Size(20, 20));
9028 clip_layer->SetMasksToBounds(true); 9032 clip_layer->SetMasksToBounds(true);
9029 clip_parent->SetBounds(gfx::Size(50, 50)); 9033 clip_parent->SetBounds(gfx::Size(50, 50));
9030 unclipped_desc_surface->SetTransform(translate); 9034 unclipped_desc_surface->SetTransform(translate);
9031 unclipped_desc_surface->SetBounds(gfx::Size(100, 100)); 9035 unclipped_desc_surface->SetBounds(gfx::Size(100, 100));
9032 unclipped_desc_surface->SetDrawsContent(true); 9036 unclipped_desc_surface->SetDrawsContent(true);
9033 unclipped_desc_surface->test_properties()->force_render_surface = true; 9037 unclipped_desc_surface->test_properties()->force_render_surface = true;
9034 clip_child->SetBounds(gfx::Size(100, 100)); 9038 clip_child->SetBounds(gfx::Size(100, 100));
9035 clip_child->SetDrawsContent(true); 9039 clip_child->SetDrawsContent(true);
9036 9040
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
9756 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index()); 9760 EXPECT_EQ(scroll_child6.id, grand_child10->scroll_tree_index());
9757 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index()); 9761 EXPECT_EQ(scroll_root1.id, parent3->scroll_tree_index());
9758 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index()); 9762 EXPECT_EQ(scroll_child7.id, child8->scroll_tree_index());
9759 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index()); 9763 EXPECT_EQ(scroll_root1.id, parent4->scroll_tree_index());
9760 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index()); 9764 EXPECT_EQ(scroll_root1.id, child9->scroll_tree_index());
9761 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index()); 9765 EXPECT_EQ(scroll_root1.id, grand_child12->scroll_tree_index());
9762 } 9766 }
9763 9767
9764 } // namespace 9768 } // namespace
9765 } // namespace cc 9769 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698