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 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 5 #ifndef UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 6 #define UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "cc/surfaces/display.h" | 12 #include "cc/surfaces/display.h" |
13 #include "cc/test/test_gpu_memory_buffer_manager.h" | 13 #include "cc/test/test_gpu_memory_buffer_manager.h" |
14 #include "cc/test/test_image_factory.h" | 14 #include "cc/test/test_image_factory.h" |
15 #include "cc/test/test_shared_bitmap_manager.h" | 15 #include "cc/test/test_shared_bitmap_manager.h" |
16 #include "cc/test/test_task_graph_runner.h" | 16 #include "cc/test/test_task_graph_runner.h" |
17 #include "gpu/ipc/common/surface_handle.h" | 17 #include "gpu/ipc/common/surface_handle.h" |
18 #include "ui/compositor/compositor.h" | 18 #include "ui/compositor/compositor.h" |
19 | 19 |
20 namespace cc { | 20 namespace cc { |
21 class SurfaceManager; | 21 class SurfaceManager; |
22 } | 22 } |
23 | 23 |
24 namespace ui { | 24 namespace ui { |
25 class InProcessContextProvider; | 25 class InProcessContextProvider; |
26 | 26 |
27 class InProcessContextFactory : public ContextFactory { | 27 class InProcessContextFactory : public ContextFactory, |
| 28 public ContextFactoryPrivate { |
28 public: | 29 public: |
29 // surface_manager is owned by the creator of this and must outlive the | 30 // surface_manager is owned by the creator of this and must outlive the |
30 // context factory. | 31 // context factory. |
31 InProcessContextFactory(bool context_factory_for_test, | 32 InProcessContextFactory(bool context_factory_for_test, |
32 cc::SurfaceManager* surface_manager); | 33 cc::SurfaceManager* surface_manager); |
33 ~InProcessContextFactory() override; | 34 ~InProcessContextFactory() override; |
34 | 35 |
35 // If true (the default) an OutputSurface is created that does not display | 36 // If true (the default) an OutputSurface is created that does not display |
36 // anything. Set to false if you want to see results on the screen. | 37 // anything. Set to false if you want to see results on the screen. |
37 void set_use_test_surface(bool use_test_surface) { | 38 void set_use_test_surface(bool use_test_surface) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 using PerCompositorDataMap = | 93 using PerCompositorDataMap = |
93 base::hash_map<ui::Compositor*, std::unique_ptr<PerCompositorData>>; | 94 base::hash_map<ui::Compositor*, std::unique_ptr<PerCompositorData>>; |
94 PerCompositorDataMap per_compositor_data_; | 95 PerCompositorDataMap per_compositor_data_; |
95 | 96 |
96 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); | 97 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); |
97 }; | 98 }; |
98 | 99 |
99 } // namespace ui | 100 } // namespace ui |
100 | 101 |
101 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 102 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
OLD | NEW |