Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(779)

Side by Side Diff: content/browser/compositor/gpu_process_transport_factory.h

Issue 2318753002: Fix GpuProcessTransportFactory destructor crash (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 bool create_gpu_output_surface, 98 bool create_gpu_output_surface,
99 int num_attempts, 99 int num_attempts,
100 scoped_refptr<gpu::GpuChannelHost> established_channel_host); 100 scoped_refptr<gpu::GpuChannelHost> established_channel_host);
101 101
102 void OnLostMainThreadSharedContextInsideCallback(); 102 void OnLostMainThreadSharedContextInsideCallback();
103 void OnLostMainThreadSharedContext(); 103 void OnLostMainThreadSharedContext();
104 104
105 scoped_refptr<cc::VulkanInProcessContextProvider> 105 scoped_refptr<cc::VulkanInProcessContextProvider>
106 SharedVulkanContextProvider(); 106 SharedVulkanContextProvider();
107 107
108 std::unique_ptr<cc::SurfaceManager> surface_manager_;
109 uint32_t next_surface_client_id_ = 1u;
110
111 // Depends on SurfaceManager.
108 typedef std::map<ui::Compositor*, std::unique_ptr<PerCompositorData>> 112 typedef std::map<ui::Compositor*, std::unique_ptr<PerCompositorData>>
109 PerCompositorDataMap; 113 PerCompositorDataMap;
110 PerCompositorDataMap per_compositor_data_; 114 PerCompositorDataMap per_compositor_data_;
115
111 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_; 116 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_;
112 std::unique_ptr<display_compositor::GLHelper> gl_helper_; 117 std::unique_ptr<display_compositor::GLHelper> gl_helper_;
113 base::ObserverList<ui::ContextFactoryObserver> observer_list_; 118 base::ObserverList<ui::ContextFactoryObserver> observer_list_;
114 std::unique_ptr<cc::SurfaceManager> surface_manager_;
115 uint32_t next_surface_client_id_;
116 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_; 119 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_;
117 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; 120 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_;
118 121
119 bool shared_vulkan_context_provider_initialized_ = false; 122 bool shared_vulkan_context_provider_initialized_ = false;
120 scoped_refptr<cc::VulkanInProcessContextProvider> 123 scoped_refptr<cc::VulkanInProcessContextProvider>
121 shared_vulkan_context_provider_; 124 shared_vulkan_context_provider_;
122 125
123 gpu::GpuChannelEstablishFactory* gpu_channel_factory_ = nullptr; 126 gpu::GpuChannelEstablishFactory* gpu_channel_factory_ = nullptr;
124 127
125 #if defined(OS_WIN) 128 #if defined(OS_WIN)
126 std::unique_ptr<OutputDeviceBacking> software_backing_; 129 std::unique_ptr<OutputDeviceBacking> software_backing_;
127 #endif 130 #endif
128 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; 131 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_;
129 132
130 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); 133 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory);
131 }; 134 };
132 135
133 } // namespace content 136 } // namespace content
134 137
135 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ 138 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/compositor/gpu_process_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698