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

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

Issue 2053983003: cc : Move LayerImpl::parent to test properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 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/layer_tree_host_impl_unittest.cc ('k') | cc/trees/property_tree_builder.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 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/occlusion_tracker.h" 5 #include "cc/trees/occlusion_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 const gfx::Transform& transform, 293 const gfx::Transform& transform,
294 const gfx::PointF& position, 294 const gfx::PointF& position,
295 const gfx::Size& bounds) { 295 const gfx::Size& bounds) {
296 layer->SetTransform(transform); 296 layer->SetTransform(transform);
297 layer->SetPosition(position); 297 layer->SetPosition(position);
298 layer->SetBounds(bounds); 298 layer->SetBounds(bounds);
299 } 299 }
300 300
301 void SetReplica(LayerImpl* owning_layer, std::unique_ptr<LayerImpl> layer) { 301 void SetReplica(LayerImpl* owning_layer, std::unique_ptr<LayerImpl> layer) {
302 // We need to set parent on replica layer for property tree building. 302 // We need to set parent on replica layer for property tree building.
303 layer->SetParent(owning_layer); 303 layer->test_properties()->parent = owning_layer;
304 owning_layer->test_properties()->SetReplicaLayer(std::move(layer)); 304 owning_layer->test_properties()->SetReplicaLayer(std::move(layer));
305 } 305 }
306 306
307 void SetMask(LayerImpl* owning_layer, std::unique_ptr<LayerImpl> layer) { 307 void SetMask(LayerImpl* owning_layer, std::unique_ptr<LayerImpl> layer) {
308 owning_layer->test_properties()->SetMaskLayer(std::move(layer)); 308 owning_layer->test_properties()->SetMaskLayer(std::move(layer));
309 } 309 }
310 310
311 bool opaque_layers_; 311 bool opaque_layers_;
312 FakeLayerTreeHostClient client_; 312 FakeLayerTreeHostClient client_;
313 TestTaskGraphRunner task_graph_runner_; 313 TestTaskGraphRunner task_graph_runner_;
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 EXPECT_EQ(gfx::Rect(), 2514 EXPECT_EQ(gfx::Rect(),
2515 occlusion.UnoccludedSurfaceContentRect( 2515 occlusion.UnoccludedSurfaceContentRect(
2516 surface, gfx::Rect(80, 70, 50, 50))); 2516 surface, gfx::Rect(80, 70, 50, 50)));
2517 } 2517 }
2518 }; 2518 };
2519 2519
2520 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) 2520 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery)
2521 2521
2522 } // namespace 2522 } // namespace
2523 } // namespace cc 2523 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698