| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 void SetRootLayerOnMainThread(Layer* root) { | 286 void SetRootLayerOnMainThread(Layer* root) { |
| 287 host_->SetRootLayer(scoped_refptr<Layer>(root)); | 287 host_->SetRootLayer(scoped_refptr<Layer>(root)); |
| 288 } | 288 } |
| 289 | 289 |
| 290 void SetRootLayerOnMainThread(LayerImpl* root) {} | 290 void SetRootLayerOnMainThread(LayerImpl* root) {} |
| 291 | 291 |
| 292 void SetProperties(LayerImpl* layer, | 292 void SetProperties(LayerImpl* layer, |
| 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->test_properties()->transform = 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->test_properties()->parent = 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 |
| (...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2627 EXPECT_EQ(gfx::Rect(), | 2627 EXPECT_EQ(gfx::Rect(), |
| 2628 occlusion.UnoccludedSurfaceContentRect( | 2628 occlusion.UnoccludedSurfaceContentRect( |
| 2629 surface, gfx::Rect(80, 70, 50, 50))); | 2629 surface, gfx::Rect(80, 70, 50, 50))); |
| 2630 } | 2630 } |
| 2631 }; | 2631 }; |
| 2632 | 2632 |
| 2633 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) | 2633 ALL_OCCLUSIONTRACKER_TEST(OcclusionTrackerTestUnoccludedSurfaceQuery) |
| 2634 | 2634 |
| 2635 } // namespace | 2635 } // namespace |
| 2636 } // namespace cc | 2636 } // namespace cc |
| OLD | NEW |