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/surfaces/frame_sink_id_allocator.h" |
13 #include "cc/test/test_gpu_memory_buffer_manager.h" | 14 #include "cc/test/test_gpu_memory_buffer_manager.h" |
14 #include "cc/test/test_image_factory.h" | 15 #include "cc/test/test_image_factory.h" |
15 #include "cc/test/test_shared_bitmap_manager.h" | 16 #include "cc/test/test_shared_bitmap_manager.h" |
16 #include "cc/test/test_task_graph_runner.h" | 17 #include "cc/test/test_task_graph_runner.h" |
17 #include "gpu/ipc/common/surface_handle.h" | 18 #include "gpu/ipc/common/surface_handle.h" |
18 #include "ui/compositor/compositor.h" | 19 #include "ui/compositor/compositor.h" |
19 | 20 |
20 namespace cc { | 21 namespace cc { |
21 class SurfaceManager; | 22 class SurfaceManager; |
22 } | 23 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 struct PerCompositorData; | 78 struct PerCompositorData; |
78 | 79 |
79 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor); | 80 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor); |
80 | 81 |
81 scoped_refptr<InProcessContextProvider> shared_main_thread_contexts_; | 82 scoped_refptr<InProcessContextProvider> shared_main_thread_contexts_; |
82 scoped_refptr<InProcessContextProvider> shared_worker_context_provider_; | 83 scoped_refptr<InProcessContextProvider> shared_worker_context_provider_; |
83 cc::TestSharedBitmapManager shared_bitmap_manager_; | 84 cc::TestSharedBitmapManager shared_bitmap_manager_; |
84 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; | 85 cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; |
85 cc::TestImageFactory image_factory_; | 86 cc::TestImageFactory image_factory_; |
86 cc::TestTaskGraphRunner task_graph_runner_; | 87 cc::TestTaskGraphRunner task_graph_runner_; |
87 uint32_t next_surface_sink_id_; | 88 cc::FrameSinkIdAllocator frame_sink_id_allocator_; |
88 bool use_test_surface_; | 89 bool use_test_surface_; |
89 bool context_factory_for_test_; | 90 bool context_factory_for_test_; |
90 cc::SurfaceManager* surface_manager_; | 91 cc::SurfaceManager* surface_manager_; |
91 base::ObserverList<ContextFactoryObserver> observer_list_; | 92 base::ObserverList<ContextFactoryObserver> observer_list_; |
92 | 93 |
93 using PerCompositorDataMap = | 94 using PerCompositorDataMap = |
94 base::hash_map<ui::Compositor*, std::unique_ptr<PerCompositorData>>; | 95 base::hash_map<ui::Compositor*, std::unique_ptr<PerCompositorData>>; |
95 PerCompositorDataMap per_compositor_data_; | 96 PerCompositorDataMap per_compositor_data_; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); | 98 DISALLOW_COPY_AND_ASSIGN(InProcessContextFactory); |
98 }; | 99 }; |
99 | 100 |
100 } // namespace ui | 101 } // namespace ui |
101 | 102 |
102 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ | 103 #endif // UI_COMPOSITOR_TEST_IN_PROCESS_CONTEXT_FACTORY_H_ |
OLD | NEW |