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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "cc/animation/animation_host.h" | 10 #include "cc/animation/animation_host.h" |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 | 900 |
901 class MockLayerTreeHost : public LayerTreeHostInProcess { | 901 class MockLayerTreeHost : public LayerTreeHostInProcess { |
902 public: | 902 public: |
903 MockLayerTreeHost(LayerTreeHostSingleThreadClient* single_thread_client, | 903 MockLayerTreeHost(LayerTreeHostSingleThreadClient* single_thread_client, |
904 LayerTreeHostInProcess::InitParams* params) | 904 LayerTreeHostInProcess::InitParams* params) |
905 : LayerTreeHostInProcess( | 905 : LayerTreeHostInProcess( |
906 params, | 906 params, |
907 CompositorMode::SINGLE_THREADED, | 907 CompositorMode::SINGLE_THREADED, |
908 base::MakeUnique<StrictMock<MockLayerTree>>(params, this)) { | 908 base::MakeUnique<StrictMock<MockLayerTree>>(params, this)) { |
909 InitializeSingleThreaded(single_thread_client, | 909 InitializeSingleThreaded(single_thread_client, |
910 base::ThreadTaskRunnerHandle::Get(), nullptr); | 910 base::ThreadTaskRunnerHandle::Get()); |
911 } | 911 } |
912 | 912 |
913 MOCK_METHOD0(SetNeedsCommit, void()); | 913 MOCK_METHOD0(SetNeedsCommit, void()); |
914 MOCK_METHOD0(SetNeedsUpdateLayers, void()); | 914 MOCK_METHOD0(SetNeedsUpdateLayers, void()); |
915 }; | 915 }; |
916 | 916 |
917 class LayerTest : public testing::Test { | 917 class LayerTest : public testing::Test { |
918 public: | 918 public: |
919 LayerTest() | 919 LayerTest() |
920 : host_impl_(LayerTreeSettings(), | 920 : host_impl_(LayerTreeSettings(), |
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2554 EXPECT_EQ(MutableProperty::kNone, impl_layer->mutable_properties()); | 2554 EXPECT_EQ(MutableProperty::kNone, impl_layer->mutable_properties()); |
2555 | 2555 |
2556 test_layer->PushPropertiesTo(impl_layer.get()); | 2556 test_layer->PushPropertiesTo(impl_layer.get()); |
2557 | 2557 |
2558 EXPECT_EQ(ElementId(2, 0), impl_layer->element_id()); | 2558 EXPECT_EQ(ElementId(2, 0), impl_layer->element_id()); |
2559 EXPECT_EQ(MutableProperty::kTransform, impl_layer->mutable_properties()); | 2559 EXPECT_EQ(MutableProperty::kTransform, impl_layer->mutable_properties()); |
2560 } | 2560 } |
2561 | 2561 |
2562 } // namespace | 2562 } // namespace |
2563 } // namespace cc | 2563 } // namespace cc |
OLD | NEW |