Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/tree_synchronizer.h" | 5 #include "cc/trees/tree_synchronizer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/format_macros.h" | 13 #include "base/format_macros.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 16 #include "cc/layers/layer.h" | 16 #include "cc/layers/layer.h" |
| 17 #include "cc/layers/layer_impl.h" | 17 #include "cc/layers/layer_impl.h" |
| 18 #include "cc/test/animation_test_common.h" | 18 #include "cc/test/animation_test_common.h" |
| 19 #include "cc/test/fake_impl_task_runner_provider.h" | 19 #include "cc/test/fake_impl_task_runner_provider.h" |
| 20 #include "cc/test/fake_layer_tree_host.h" | 20 #include "cc/test/fake_layer_tree_host.h" |
| 21 #include "cc/test/fake_rendering_stats_instrumentation.h" | 21 #include "cc/test/fake_rendering_stats_instrumentation.h" |
| 22 #include "cc/test/stub_layer_tree_host_single_thread_client.h" | 22 #include "cc/test/stub_layer_tree_host_single_thread_client.h" |
| 23 #include "cc/test/test_shared_bitmap_manager.h" | 23 #include "cc/test/test_shared_bitmap_manager.h" |
| 24 #include "cc/test/test_task_graph_runner.h" | 24 #include "cc/test/test_task_graph_runner.h" |
| 25 #include "cc/trees/effect_node.h" | 25 #include "cc/trees/effect_node.h" |
| 26 #include "cc/trees/layer_tree_host_common.h" | 26 #include "cc/trees/layer_tree_host_common.h" |
| 27 #include "cc/trees/single_thread_proxy.h" | 27 #include "cc/trees/single_thread_proxy.h" |
| 28 #include "cc/trees/task_runner_provider.h" | 28 #include "cc/trees/task_runner_provider.h" |
| 29 #include "cc/trees/transform_node.h" | |
|
ajuma
2016/10/12 15:03:23
This change doesn't seem needed anymore
| |
| 29 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
| 30 | 31 |
| 31 namespace cc { | 32 namespace cc { |
| 32 namespace { | 33 namespace { |
| 33 | 34 |
| 34 class MockLayerImpl : public LayerImpl { | 35 class MockLayerImpl : public LayerImpl { |
| 35 public: | 36 public: |
| 36 static std::unique_ptr<MockLayerImpl> Create(LayerTreeImpl* tree_impl, | 37 static std::unique_ptr<MockLayerImpl> Create(LayerTreeImpl* tree_impl, |
| 37 int layer_id) { | 38 int layer_id) { |
| 38 return base::WrapUnique(new MockLayerImpl(tree_impl, layer_id)); | 39 return base::WrapUnique(new MockLayerImpl(tree_impl, layer_id)); |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 661 host_->CommitAndCreatePendingTree(); | 662 host_->CommitAndCreatePendingTree(); |
| 662 host_impl->ActivateSyncTree(); | 663 host_impl->ActivateSyncTree(); |
| 663 EXPECT_EQ( | 664 EXPECT_EQ( |
| 664 CombinedAnimationScale(0.f, 0.f), | 665 CombinedAnimationScale(0.f, 0.f), |
| 665 host_impl->active_tree()->property_trees()->GetAnimationScales( | 666 host_impl->active_tree()->property_trees()->GetAnimationScales( |
| 666 transform_layer->transform_tree_index(), host_impl->active_tree())); | 667 transform_layer->transform_tree_index(), host_impl->active_tree())); |
| 667 } | 668 } |
| 668 | 669 |
| 669 } // namespace | 670 } // namespace |
| 670 } // namespace cc | 671 } // namespace cc |
| OLD | NEW |