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

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

Issue 373113003: Keeping track of descendants that draw content instead of recalcualting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/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 <set> 7 #include <set>
8 8
9 #include "cc/animation/layer_animation_controller.h" 9 #include "cc/animation/layer_animation_controller.h"
10 #include "cc/animation/transform_operations.h" 10 #include "cc/animation/transform_operations.h"
(...skipping 6967 matching lines...) Expand 10 before | Expand all | Expand 10 after
6978 6978
6979 child2->Set3dSortingContextId(1); 6979 child2->Set3dSortingContextId(1);
6980 child3->Set3dSortingContextId(1); 6980 child3->Set3dSortingContextId(1);
6981 6981
6982 child2->AddChild(child3.Pass()); 6982 child2->AddChild(child3.Pass());
6983 child1->AddChild(child2.Pass()); 6983 child1->AddChild(child2.Pass());
6984 root->AddChild(child1.Pass()); 6984 root->AddChild(child1.Pass());
6985 6985
6986 { 6986 {
6987 LayerImplList render_surface_layer_list; 6987 LayerImplList render_surface_layer_list;
6988 FakeLayerTreeHostImpl::RecursiveUpdateNumChildren(root.get());
6988 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( 6989 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
6989 root.get(), root->bounds(), &render_surface_layer_list); 6990 root.get(), root->bounds(), &render_surface_layer_list);
6990 inputs.can_render_to_separate_surface = true; 6991 inputs.can_render_to_separate_surface = true;
6991 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 6992 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
6992 6993
6993 EXPECT_EQ(2u, render_surface_layer_list.size()); 6994 EXPECT_EQ(2u, render_surface_layer_list.size());
6994 } 6995 }
6995 6996
6996 { 6997 {
6997 LayerImplList render_surface_layer_list; 6998 LayerImplList render_surface_layer_list;
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
8593 EXPECT_FLOAT_EQ(4.f, 8594 EXPECT_FLOAT_EQ(4.f,
8594 child1_layer->replica_layer() 8595 child1_layer->replica_layer()
8595 ->mask_layer() 8596 ->mask_layer()
8596 ->draw_properties() 8597 ->draw_properties()
8597 .device_scale_factor); 8598 .device_scale_factor);
8598 EXPECT_FLOAT_EQ(4.f, child2_layer->draw_properties().device_scale_factor); 8599 EXPECT_FLOAT_EQ(4.f, child2_layer->draw_properties().device_scale_factor);
8599 } 8600 }
8600 8601
8601 } // namespace 8602 } // namespace
8602 } // namespace cc 8603 } // 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