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

Side by Side Diff: content/gpu/gpu_child_thread.h

Issue 2138263002: Revert of Move content's shell connections to the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « content/gpu/BUILD.gn ('k') | content/gpu/gpu_child_thread.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GPU_GPU_CHILD_THREAD_H_ 5 #ifndef CONTENT_GPU_GPU_CHILD_THREAD_H_
6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_ 6 #define CONTENT_GPU_GPU_CHILD_THREAD_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 10 matching lines...) Expand all
21 #include "content/child/child_thread_impl.h" 21 #include "content/child/child_thread_impl.h"
22 #include "content/common/process_control.mojom.h" 22 #include "content/common/process_control.mojom.h"
23 #include "gpu/command_buffer/service/gpu_preferences.h" 23 #include "gpu/command_buffer/service/gpu_preferences.h"
24 #include "gpu/config/gpu_info.h" 24 #include "gpu/config/gpu_info.h"
25 #include "gpu/ipc/service/gpu_channel.h" 25 #include "gpu/ipc/service/gpu_channel.h"
26 #include "gpu/ipc/service/gpu_channel_manager.h" 26 #include "gpu/ipc/service/gpu_channel_manager.h"
27 #include "gpu/ipc/service/gpu_channel_manager_delegate.h" 27 #include "gpu/ipc/service/gpu_channel_manager_delegate.h"
28 #include "gpu/ipc/service/gpu_config.h" 28 #include "gpu/ipc/service/gpu_config.h"
29 #include "gpu/ipc/service/x_util.h" 29 #include "gpu/ipc/service/x_util.h"
30 #include "mojo/public/cpp/bindings/binding_set.h" 30 #include "mojo/public/cpp/bindings/binding_set.h"
31 #include "mojo/public/cpp/bindings/interface_request.h"
31 #include "ui/gfx/native_widget_types.h" 32 #include "ui/gfx/native_widget_types.h"
32 33
33 namespace gpu { 34 namespace gpu {
34 class GpuMemoryBufferFactory; 35 class GpuMemoryBufferFactory;
35 class SyncPointManager; 36 class SyncPointManager;
36 } 37 }
37 38
38 namespace media { 39 namespace media {
39 class MediaService; 40 class MediaService;
40 } 41 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 void Init(const base::Time& process_start_time); 80 void Init(const base::Time& process_start_time);
80 void StopWatchdog(); 81 void StopWatchdog();
81 82
82 gpu::GpuPreferences gpu_preferences() { return gpu_preferences_; } 83 gpu::GpuPreferences gpu_preferences() { return gpu_preferences_; }
83 84
84 private: 85 private:
85 // ChildThreadImpl:. 86 // ChildThreadImpl:.
86 bool Send(IPC::Message* msg) override; 87 bool Send(IPC::Message* msg) override;
87 bool OnControlMessageReceived(const IPC::Message& msg) override; 88 bool OnControlMessageReceived(const IPC::Message& msg) override;
88 bool OnMessageReceived(const IPC::Message& msg) override; 89 bool OnMessageReceived(const IPC::Message& msg) override;
90 bool OnConnect(shell::Connection* connection) override;
91 shell::InterfaceRegistry* GetInterfaceRegistryForConnection() override;
92 shell::InterfaceProvider* GetInterfaceProviderForConnection() override;
89 93
90 // gpu::GpuChannelManagerDelegate: 94 // gpu::GpuChannelManagerDelegate:
91 void SetActiveURL(const GURL& url) override; 95 void SetActiveURL(const GURL& url) override;
92 void DidCreateOffscreenContext(const GURL& active_url) override; 96 void DidCreateOffscreenContext(const GURL& active_url) override;
93 void DidDestroyChannel(int client_id) override; 97 void DidDestroyChannel(int client_id) override;
94 void DidDestroyOffscreenContext(const GURL& active_url) override; 98 void DidDestroyOffscreenContext(const GURL& active_url) override;
95 void DidLoseContext(bool offscreen, 99 void DidLoseContext(bool offscreen,
96 gpu::error::ContextLostReason reason, 100 gpu::error::ContextLostReason reason,
97 const GURL& active_url) override; 101 const GURL& active_url) override;
98 void GpuMemoryUmaStats(const gpu::GPUMemoryUmaStats& params) override; 102 void GpuMemoryUmaStats(const gpu::GPUMemoryUmaStats& params) override;
(...skipping 28 matching lines...) Expand all
127 void OnLoadedShader(const std::string& shader); 131 void OnLoadedShader(const std::string& shader);
128 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, 132 void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
129 int client_id, 133 int client_id,
130 const gpu::SyncToken& sync_token); 134 const gpu::SyncToken& sync_token);
131 #if defined(OS_ANDROID) 135 #if defined(OS_ANDROID)
132 void OnWakeUpGpu(); 136 void OnWakeUpGpu();
133 void OnDestroyingVideoSurface(int surface_id); 137 void OnDestroyingVideoSurface(int surface_id);
134 #endif 138 #endif
135 void OnLoseAllContexts(); 139 void OnLoseAllContexts();
136 140
137 void BindProcessControlRequest(mojom::ProcessControlRequest request); 141 void BindProcessControlRequest(
142 mojo::InterfaceRequest<mojom::ProcessControl> request);
138 143
139 gpu::GpuPreferences gpu_preferences_; 144 gpu::GpuPreferences gpu_preferences_;
140 145
141 // Set this flag to true if a fatal error occurred before we receive the 146 // Set this flag to true if a fatal error occurred before we receive the
142 // OnInitialize message, in which case we just declare ourselves DOA. 147 // OnInitialize message, in which case we just declare ourselves DOA.
143 bool dead_on_arrival_; 148 bool dead_on_arrival_;
144 base::Time process_start_time_; 149 base::Time process_start_time_;
145 scoped_refptr<GpuWatchdogThread> watchdog_thread_; 150 scoped_refptr<GpuWatchdogThread> watchdog_thread_;
146 151
147 #if defined(OS_WIN) 152 #if defined(OS_WIN)
(...skipping 19 matching lines...) Expand all
167 172
168 // The gpu::GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers. 173 // The gpu::GpuMemoryBufferFactory instance used to allocate GpuMemoryBuffers.
169 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_; 174 gpu::GpuMemoryBufferFactory* const gpu_memory_buffer_factory_;
170 175
171 // Process control for Mojo application hosting. 176 // Process control for Mojo application hosting.
172 std::unique_ptr<GpuProcessControlImpl> process_control_; 177 std::unique_ptr<GpuProcessControlImpl> process_control_;
173 178
174 // Bindings to the mojom::ProcessControl impl. 179 // Bindings to the mojom::ProcessControl impl.
175 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_; 180 mojo::BindingSet<mojom::ProcessControl> process_control_bindings_;
176 181
182 base::Closure resume_interface_bindings_callback_;
183
177 DISALLOW_COPY_AND_ASSIGN(GpuChildThread); 184 DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
178 }; 185 };
179 186
180 } // namespace content 187 } // namespace content
181 188
182 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_ 189 #endif // CONTENT_GPU_GPU_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « content/gpu/BUILD.gn ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698