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 CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 class SimpleThread; | 25 class SimpleThread; |
26 class Thread; | 26 class Thread; |
27 } | 27 } |
28 | 28 |
29 namespace cc { | 29 namespace cc { |
30 class SingleThreadTaskGraphRunner; | 30 class SingleThreadTaskGraphRunner; |
31 class SoftwareOutputDevice; | 31 class SoftwareOutputDevice; |
32 class SurfaceManager; | 32 class SurfaceManager; |
| 33 class VulkanInProcessContextProvider; |
33 } | 34 } |
34 | 35 |
35 namespace content { | 36 namespace content { |
36 class BrowserCompositorOutputSurface; | 37 class BrowserCompositorOutputSurface; |
37 class CompositorSwapClient; | 38 class CompositorSwapClient; |
38 class ContextProviderCommandBuffer; | 39 class ContextProviderCommandBuffer; |
39 class OutputDeviceBacking; | 40 class OutputDeviceBacking; |
40 class ReflectorImpl; | 41 class ReflectorImpl; |
41 class WebGraphicsContext3DCommandBufferImpl; | 42 class WebGraphicsContext3DCommandBufferImpl; |
42 | 43 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor); | 89 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor); |
89 std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice( | 90 std::unique_ptr<cc::SoftwareOutputDevice> CreateSoftwareOutputDevice( |
90 ui::Compositor* compositor); | 91 ui::Compositor* compositor); |
91 void EstablishedGpuChannel(base::WeakPtr<ui::Compositor> compositor, | 92 void EstablishedGpuChannel(base::WeakPtr<ui::Compositor> compositor, |
92 bool create_gpu_output_surface, | 93 bool create_gpu_output_surface, |
93 int num_attempts); | 94 int num_attempts); |
94 | 95 |
95 void OnLostMainThreadSharedContextInsideCallback(); | 96 void OnLostMainThreadSharedContextInsideCallback(); |
96 void OnLostMainThreadSharedContext(); | 97 void OnLostMainThreadSharedContext(); |
97 | 98 |
| 99 scoped_refptr<cc::VulkanInProcessContextProvider> |
| 100 SharedVulkanContextProvider(); |
| 101 |
98 typedef std::map<ui::Compositor*, PerCompositorData*> PerCompositorDataMap; | 102 typedef std::map<ui::Compositor*, PerCompositorData*> PerCompositorDataMap; |
99 PerCompositorDataMap per_compositor_data_; | 103 PerCompositorDataMap per_compositor_data_; |
100 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_; | 104 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_; |
101 std::unique_ptr<GLHelper> gl_helper_; | 105 std::unique_ptr<GLHelper> gl_helper_; |
102 base::ObserverList<ImageTransportFactoryObserver> observer_list_; | 106 base::ObserverList<ImageTransportFactoryObserver> observer_list_; |
103 std::unique_ptr<cc::SurfaceManager> surface_manager_; | 107 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
104 uint32_t next_surface_id_namespace_; | 108 uint32_t next_surface_id_namespace_; |
105 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_; | 109 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_; |
106 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; | 110 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; |
107 | 111 |
| 112 bool shared_vulkan_context_provider_initialized_ = false; |
| 113 scoped_refptr<cc::VulkanInProcessContextProvider> |
| 114 shared_vulkan_context_provider_; |
| 115 |
108 #if defined(OS_WIN) | 116 #if defined(OS_WIN) |
109 std::unique_ptr<OutputDeviceBacking> software_backing_; | 117 std::unique_ptr<OutputDeviceBacking> software_backing_; |
110 #endif | 118 #endif |
111 | 119 |
112 // The contents of this map and its methods may only be used on the compositor | 120 // The contents of this map and its methods may only be used on the compositor |
113 // thread. | 121 // thread. |
114 IDMap<BrowserCompositorOutputSurface> output_surface_map_; | 122 IDMap<BrowserCompositorOutputSurface> output_surface_map_; |
115 | 123 |
116 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; | 124 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; |
117 | 125 |
118 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); | 126 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); |
119 }; | 127 }; |
120 | 128 |
121 } // namespace content | 129 } // namespace content |
122 | 130 |
123 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 131 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
OLD | NEW |