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

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

Issue 14301021: cc: Don't pass simple well-defined classes by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/proxy.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "cc/test/layer_tree_test.h" 8 #include "cc/test/layer_tree_test.h"
9 #include "cc/test/occlusion_tracker_test_common.h" 9 #include "cc/test/occlusion_tracker_test_common.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void VerifyOcclusion(TestLayer* layer) const { 74 void VerifyOcclusion(TestLayer* layer) const {
75 EXPECT_EQ(layer->expected_occlusion().ToString(), 75 EXPECT_EQ(layer->expected_occlusion().ToString(),
76 layer->occlusion().ToString()); 76 layer->occlusion().ToString());
77 77
78 for (size_t i = 0; i < layer->children().size(); ++i) { 78 for (size_t i = 0; i < layer->children().size(); ++i) {
79 TestLayer* child = static_cast<TestLayer*>(layer->children()[i].get()); 79 TestLayer* child = static_cast<TestLayer*>(layer->children()[i].get());
80 VerifyOcclusion(child); 80 VerifyOcclusion(child);
81 } 81 }
82 } 82 }
83 83
84 void SetLayerPropertiesForTesting( 84 void SetLayerPropertiesForTesting(TestLayer* layer,
85 TestLayer* layer, TestLayer* parent, const gfx::Transform& transform, 85 TestLayer* parent,
86 const gfx::PointF& position, const gfx::Size& bounds, bool opaque) const { 86 const gfx::Transform& transform,
87 gfx::PointF position,
88 gfx::Size bounds,
89 bool opaque) const {
87 layer->RemoveAllChildren(); 90 layer->RemoveAllChildren();
88 if (parent) 91 if (parent)
89 parent->AddChild(layer); 92 parent->AddChild(layer);
90 layer->SetTransform(transform); 93 layer->SetTransform(transform);
91 layer->SetPosition(position); 94 layer->SetPosition(position);
92 layer->SetBounds(bounds); 95 layer->SetBounds(bounds);
93 layer->SetContentsOpaque(opaque); 96 layer->SetContentsOpaque(opaque);
94 97
95 layer->SetAnchorPoint(gfx::PointF()); 98 layer->SetAnchorPoint(gfx::PointF());
96 } 99 }
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 469
467 layer_tree_host()->SetRootLayer(layers[0]); 470 layer_tree_host()->SetRootLayer(layers[0]);
468 LayerTreeTest::SetupTree(); 471 LayerTreeTest::SetupTree();
469 } 472 }
470 }; 473 };
471 474
472 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestManySurfaces); 475 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostOcclusionTestManySurfaces);
473 476
474 } // namespace 477 } // namespace
475 } // namespace cc 478 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698