| 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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
| 6 | 6 |
| 7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "cc/animation/keyframed_animation_curve.h" | 8 #include "cc/animation/keyframed_animation_curve.h" |
| 9 #include "cc/base/math_util.h" | 9 #include "cc/base/math_util.h" |
| 10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ | 40 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ |
| 41 } while (false) | 41 } while (false) |
| 42 | 42 |
| 43 namespace cc { | 43 namespace cc { |
| 44 namespace { | 44 namespace { |
| 45 | 45 |
| 46 class MockLayerTreeHost : public LayerTreeHost { | 46 class MockLayerTreeHost : public LayerTreeHost { |
| 47 public: | 47 public: |
| 48 MockLayerTreeHost(LayerTreeHostSingleThreadClient* single_thread_client, | 48 MockLayerTreeHost(LayerTreeHostSingleThreadClient* single_thread_client, |
| 49 LayerTreeHost::InitParams* params) | 49 LayerTreeHost::InitParams* params) |
| 50 : LayerTreeHost(params) { | 50 : LayerTreeHost(params, CompositorMode::SingleThreaded) { |
| 51 InitializeSingleThreaded(single_thread_client, | 51 InitializeSingleThreaded(single_thread_client, |
| 52 base::ThreadTaskRunnerHandle::Get(), nullptr); | 52 base::ThreadTaskRunnerHandle::Get(), nullptr); |
| 53 } | 53 } |
| 54 | 54 |
| 55 MOCK_METHOD0(SetNeedsCommit, void()); | 55 MOCK_METHOD0(SetNeedsCommit, void()); |
| 56 MOCK_METHOD0(SetNeedsUpdateLayers, void()); | 56 MOCK_METHOD0(SetNeedsUpdateLayers, void()); |
| 57 MOCK_METHOD0(SetNeedsFullTreeSync, void()); | 57 MOCK_METHOD0(SetNeedsFullTreeSync, void()); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class LayerTest : public testing::Test { | 60 class LayerTest : public testing::Test { |
| (...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1699 | 1699 |
| 1700 properties.set_needs_push_properties(true); | 1700 properties.set_needs_push_properties(true); |
| 1701 properties.mutable_base(); | 1701 properties.mutable_base(); |
| 1702 layer->FromLayerPropertiesProto(properties); | 1702 layer->FromLayerPropertiesProto(properties); |
| 1703 EXPECT_TRUE(layer->needs_push_properties()); | 1703 EXPECT_TRUE(layer->needs_push_properties()); |
| 1704 EXPECT_FALSE(layer->descendant_needs_push_properties()); | 1704 EXPECT_FALSE(layer->descendant_needs_push_properties()); |
| 1705 } | 1705 } |
| 1706 | 1706 |
| 1707 } // namespace | 1707 } // namespace |
| 1708 } // namespace cc | 1708 } // namespace cc |
| OLD | NEW |