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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 cc::SharedBitmapManager* GetSharedBitmapManager() override; | 62 cc::SharedBitmapManager* GetSharedBitmapManager() override; |
63 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; | 63 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; |
64 cc::TaskGraphRunner* GetTaskGraphRunner() override; | 64 cc::TaskGraphRunner* GetTaskGraphRunner() override; |
65 std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() override; | 65 std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() override; |
66 void ResizeDisplay(ui::Compositor* compositor, | 66 void ResizeDisplay(ui::Compositor* compositor, |
67 const gfx::Size& size) override; | 67 const gfx::Size& size) override; |
68 | 68 |
69 // ImageTransportFactory implementation. | 69 // ImageTransportFactory implementation. |
70 ui::ContextFactory* GetContextFactory() override; | 70 ui::ContextFactory* GetContextFactory() override; |
71 cc::SurfaceManager* GetSurfaceManager() override; | 71 cc::SurfaceManager* GetSurfaceManager() override; |
72 display_compositor::GLHelper* GetGLHelper() override; | 72 GLHelper* GetGLHelper() override; |
73 void AddObserver(ImageTransportFactoryObserver* observer) override; | 73 void AddObserver(ImageTransportFactoryObserver* observer) override; |
74 void RemoveObserver(ImageTransportFactoryObserver* observer) override; | 74 void RemoveObserver(ImageTransportFactoryObserver* observer) override; |
75 #if defined(OS_MACOSX) | 75 #if defined(OS_MACOSX) |
76 void OnGpuSwapBuffersCompleted( | 76 void OnGpuSwapBuffersCompleted( |
77 int surface_id, | 77 int surface_id, |
78 const std::vector<ui::LatencyInfo>& latency_info, | 78 const std::vector<ui::LatencyInfo>& latency_info, |
79 gfx::SwapResult result) override; | 79 gfx::SwapResult result) override; |
80 void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, | 80 void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, |
81 bool suspended) override; | 81 bool suspended) override; |
82 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle( | 82 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle( |
(...skipping 12 matching lines...) Expand all Loading... |
95 | 95 |
96 void OnLostMainThreadSharedContextInsideCallback(); | 96 void OnLostMainThreadSharedContextInsideCallback(); |
97 void OnLostMainThreadSharedContext(); | 97 void OnLostMainThreadSharedContext(); |
98 | 98 |
99 scoped_refptr<cc::VulkanInProcessContextProvider> | 99 scoped_refptr<cc::VulkanInProcessContextProvider> |
100 SharedVulkanContextProvider(); | 100 SharedVulkanContextProvider(); |
101 | 101 |
102 typedef std::map<ui::Compositor*, PerCompositorData*> PerCompositorDataMap; | 102 typedef std::map<ui::Compositor*, PerCompositorData*> PerCompositorDataMap; |
103 PerCompositorDataMap per_compositor_data_; | 103 PerCompositorDataMap per_compositor_data_; |
104 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_; | 104 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_; |
105 std::unique_ptr<display_compositor::GLHelper> gl_helper_; | 105 std::unique_ptr<GLHelper> gl_helper_; |
106 base::ObserverList<ImageTransportFactoryObserver> observer_list_; | 106 base::ObserverList<ImageTransportFactoryObserver> observer_list_; |
107 std::unique_ptr<cc::SurfaceManager> surface_manager_; | 107 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
108 uint32_t next_surface_id_namespace_; | 108 uint32_t next_surface_id_namespace_; |
109 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_; | 109 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_; |
110 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; | 110 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; |
111 | 111 |
112 bool shared_vulkan_context_provider_initialized_ = false; | 112 bool shared_vulkan_context_provider_initialized_ = false; |
113 scoped_refptr<cc::VulkanInProcessContextProvider> | 113 scoped_refptr<cc::VulkanInProcessContextProvider> |
114 shared_vulkan_context_provider_; | 114 shared_vulkan_context_provider_; |
115 | 115 |
116 #if defined(OS_WIN) | 116 #if defined(OS_WIN) |
117 std::unique_ptr<OutputDeviceBacking> software_backing_; | 117 std::unique_ptr<OutputDeviceBacking> software_backing_; |
118 #endif | 118 #endif |
119 | 119 |
120 // 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 |
121 // thread. | 121 // thread. |
122 IDMap<BrowserCompositorOutputSurface> output_surface_map_; | 122 IDMap<BrowserCompositorOutputSurface> output_surface_map_; |
123 | 123 |
124 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; | 124 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; |
125 | 125 |
126 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); | 126 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace content | 129 } // namespace content |
130 | 130 |
131 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 131 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
OLD | NEW |