| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/layers/layer_utils.h" | 5 #include "cc/layers/layer_utils.h" |
| 6 | 6 |
| 7 #include "cc/animation/transform_operations.h" | 7 #include "cc/animation/transform_operations.h" |
| 8 #include "cc/layers/layer_impl.h" | 8 #include "cc/layers/layer_impl.h" |
| 9 #include "cc/test/animation_test_common.h" | 9 #include "cc/test/animation_test_common.h" |
| 10 #include "cc/test/fake_impl_task_runner_provider.h" | 10 #include "cc/test/fake_impl_task_runner_provider.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 LayerImpl* parent() { return parent_; } | 36 LayerImpl* parent() { return parent_; } |
| 37 LayerImpl* child() { return child_; } | 37 LayerImpl* child() { return child_; } |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 static scoped_ptr<LayerImpl> CreateThreeNodeTree( | 40 static scoped_ptr<LayerImpl> CreateThreeNodeTree( |
| 41 LayerTreeHostImpl* host_impl) { | 41 LayerTreeHostImpl* host_impl) { |
| 42 scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl->active_tree(), 1); | 42 scoped_ptr<LayerImpl> root = LayerImpl::Create(host_impl->active_tree(), 1); |
| 43 root->AddChild(LayerImpl::Create(host_impl->active_tree(), 2)); | 43 root->AddChild(LayerImpl::Create(host_impl->active_tree(), 2)); |
| 44 root->children()[0]->AddChild( | 44 root->children()[0]->AddChild( |
| 45 LayerImpl::Create(host_impl->active_tree(), 3)); | 45 LayerImpl::Create(host_impl->active_tree(), 3)); |
| 46 return root.Pass(); | 46 return root; |
| 47 } | 47 } |
| 48 | 48 |
| 49 FakeImplTaskRunnerProvider task_runner_provider_; | 49 FakeImplTaskRunnerProvider task_runner_provider_; |
| 50 TestSharedBitmapManager shared_bitmap_manager_; | 50 TestSharedBitmapManager shared_bitmap_manager_; |
| 51 TestTaskGraphRunner task_graph_runner_; | 51 TestTaskGraphRunner task_graph_runner_; |
| 52 FakeLayerTreeHostImpl host_impl_; | 52 FakeLayerTreeHostImpl host_impl_; |
| 53 scoped_ptr<LayerImpl> root_; | 53 scoped_ptr<LayerImpl> root_; |
| 54 LayerImpl* parent_; | 54 LayerImpl* parent_; |
| 55 LayerImpl* child_; | 55 LayerImpl* child_; |
| 56 }; | 56 }; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 child()->SetPosition(gfx::PointF(150.f, 50.f)); | 262 child()->SetPosition(gfx::PointF(150.f, 50.f)); |
| 263 child()->SetBounds(bounds); | 263 child()->SetBounds(bounds); |
| 264 | 264 |
| 265 gfx::BoxF box; | 265 gfx::BoxF box; |
| 266 bool success = LayerUtils::GetAnimationBounds(*child(), &box); | 266 bool success = LayerUtils::GetAnimationBounds(*child(), &box); |
| 267 EXPECT_FALSE(success); | 267 EXPECT_FALSE(success); |
| 268 } | 268 } |
| 269 | 269 |
| 270 } // namespace | 270 } // namespace |
| 271 } // namespace cc | 271 } // namespace cc |
| OLD | NEW |