| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BLIMP_CLIENT_TEST_COMPOSITOR_BLIMP_COMPOSITOR_WITH_FAKE_HOST_H_ | |
| 6 #define BLIMP_CLIENT_TEST_COMPOSITOR_BLIMP_COMPOSITOR_WITH_FAKE_HOST_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "blimp/client/core/compositor/blimp_compositor.h" | |
| 10 #include "cc/test/fake_layer_tree_host.h" | |
| 11 #include "cc/test/fake_layer_tree_host_client.h" | |
| 12 #include "cc/test/test_task_graph_runner.h" | |
| 13 | |
| 14 namespace cc { | |
| 15 namespace proto { | |
| 16 class CompositorMessage; | |
| 17 } | |
| 18 } | |
| 19 | |
| 20 namespace blimp { | |
| 21 namespace client { | |
| 22 | |
| 23 class BlimpCompositorWithFakeHost : public BlimpCompositor { | |
| 24 public: | |
| 25 static std::unique_ptr<BlimpCompositorWithFakeHost> Create( | |
| 26 BlimpCompositorDependencies* compositor_dependencies, | |
| 27 BlimpCompositorClient* client); | |
| 28 ~BlimpCompositorWithFakeHost() override; | |
| 29 | |
| 30 std::unique_ptr<cc::proto::CompositorMessage> CreateFakeUpdate( | |
| 31 scoped_refptr<cc::Layer> root_layer); | |
| 32 cc::FakeLayerTreeHost* host() { return fake_host_; } | |
| 33 | |
| 34 protected: | |
| 35 BlimpCompositorWithFakeHost( | |
| 36 BlimpCompositorDependencies* compositor_dependencies, | |
| 37 BlimpCompositorClient* client); | |
| 38 | |
| 39 std::unique_ptr<cc::LayerTreeHostInProcess> CreateLayerTreeHost() override; | |
| 40 | |
| 41 private: | |
| 42 cc::FakeLayerTreeHostClient fake_client_; | |
| 43 cc::TestTaskGraphRunner task_graph_runner_; | |
| 44 cc::FakeLayerTreeHost* fake_host_ = nullptr; | |
| 45 }; | |
| 46 | |
| 47 } // namespace client | |
| 48 } // namespace blimp | |
| 49 | |
| 50 #endif // BLIMP_CLIENT_TEST_COMPOSITOR_BLIMP_COMPOSITOR_WITH_FAKE_HOST_H_ | |
| OLD | NEW |