| OLD | NEW |
| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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->SetParent(owning_layer); |
| 304 owning_layer->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->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_; |
| 314 std::unique_ptr<FakeLayerTreeHost> host_; | 314 std::unique_ptr<FakeLayerTreeHost> host_; |
| 315 // These hold ownership of the layers for the duration of the test. | 315 // These hold ownership of the layers for the duration of the test. |
| 316 LayerImplList render_surface_layer_list_impl_; | 316 LayerImplList render_surface_layer_list_impl_; |
| 317 LayerIterator layer_iterator_begin_; | 317 LayerIterator layer_iterator_begin_; |
| 318 LayerIterator layer_iterator_; | 318 LayerIterator layer_iterator_; |
| (...skipping 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |