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

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

Issue 2317363004: Fix use-after-free in ~GpuProcessTransportFactory (Closed)
Patch Set: Just change data order 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 | no next file » | 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_; 108 std::unique_ptr<cc::SurfaceManager> surface_manager_;
109 uint32_t next_surface_client_id_ = 1u; 109 uint32_t next_surface_client_id_ = 1u;
110 110
111 #if defined(OS_WIN)
112 // Used by output surface, stored in PerCompositorData.
113 std::unique_ptr<OutputDeviceBacking> software_backing_;
114 #endif
115
111 // Depends on SurfaceManager. 116 // Depends on SurfaceManager.
112 typedef std::map<ui::Compositor*, std::unique_ptr<PerCompositorData>> 117 typedef std::map<ui::Compositor*, std::unique_ptr<PerCompositorData>>
113 PerCompositorDataMap; 118 PerCompositorDataMap;
114 PerCompositorDataMap per_compositor_data_; 119 PerCompositorDataMap per_compositor_data_;
115 120
116 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_; 121 scoped_refptr<ContextProviderCommandBuffer> shared_main_thread_contexts_;
117 std::unique_ptr<display_compositor::GLHelper> gl_helper_; 122 std::unique_ptr<display_compositor::GLHelper> gl_helper_;
118 base::ObserverList<ui::ContextFactoryObserver> observer_list_; 123 base::ObserverList<ui::ContextFactoryObserver> observer_list_;
119 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_; 124 std::unique_ptr<cc::SingleThreadTaskGraphRunner> task_graph_runner_;
120 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_; 125 scoped_refptr<ContextProviderCommandBuffer> shared_worker_context_provider_;
121 126
122 bool shared_vulkan_context_provider_initialized_ = false; 127 bool shared_vulkan_context_provider_initialized_ = false;
123 scoped_refptr<cc::VulkanInProcessContextProvider> 128 scoped_refptr<cc::VulkanInProcessContextProvider>
124 shared_vulkan_context_provider_; 129 shared_vulkan_context_provider_;
125 130
126 gpu::GpuChannelEstablishFactory* gpu_channel_factory_ = nullptr; 131 gpu::GpuChannelEstablishFactory* gpu_channel_factory_ = nullptr;
127 132
128 #if defined(OS_WIN)
129 std::unique_ptr<OutputDeviceBacking> software_backing_;
130 #endif
131 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; 133 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_;
132 134
133 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); 135 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory);
134 }; 136 };
135 137
136 } // namespace content 138 } // namespace content
137 139
138 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ 140 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698