OLD | NEW |
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 #include "content/gpu/gpu_child_thread.h" | 5 #include "content/gpu/gpu_child_thread.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 #endif | 160 #endif |
161 g_thread_safe_sender.Get() = thread_safe_sender(); | 161 g_thread_safe_sender.Get() = thread_safe_sender(); |
162 } | 162 } |
163 | 163 |
164 GpuChildThread::GpuChildThread( | 164 GpuChildThread::GpuChildThread( |
165 const InProcessChildThreadParams& params, | 165 const InProcessChildThreadParams& params, |
166 const gpu::GPUInfo& gpu_info, | 166 const gpu::GPUInfo& gpu_info, |
167 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory) | 167 gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory) |
168 : ChildThreadImpl(ChildThreadImpl::Options::Builder() | 168 : ChildThreadImpl(ChildThreadImpl::Options::Builder() |
169 .InBrowserProcess(params) | 169 .InBrowserProcess(params) |
170 .UseMojoChannel(true) | |
171 .AddStartupFilter(new GpuMemoryBufferMessageFilter( | 170 .AddStartupFilter(new GpuMemoryBufferMessageFilter( |
172 gpu_memory_buffer_factory)) | 171 gpu_memory_buffer_factory)) |
173 .ConnectToBrowser(true) | 172 .ConnectToBrowser(true) |
174 .Build()), | 173 .Build()), |
175 dead_on_arrival_(false), | 174 dead_on_arrival_(false), |
176 gpu_info_(gpu_info), | 175 gpu_info_(gpu_info), |
177 in_browser_process_(true), | 176 in_browser_process_(true), |
178 gpu_memory_buffer_factory_(gpu_memory_buffer_factory) { | 177 gpu_memory_buffer_factory_(gpu_memory_buffer_factory) { |
179 #if defined(OS_WIN) | 178 #if defined(OS_WIN) |
180 target_services_ = NULL; | 179 target_services_ = NULL; |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 | 542 |
544 void GpuChildThread::BindServiceFactoryRequest( | 543 void GpuChildThread::BindServiceFactoryRequest( |
545 shell::mojom::ServiceFactoryRequest request) { | 544 shell::mojom::ServiceFactoryRequest request) { |
546 DVLOG(1) << "GPU: Binding shell::mojom::ServiceFactoryRequest"; | 545 DVLOG(1) << "GPU: Binding shell::mojom::ServiceFactoryRequest"; |
547 DCHECK(service_factory_); | 546 DCHECK(service_factory_); |
548 service_factory_bindings_.AddBinding(service_factory_.get(), | 547 service_factory_bindings_.AddBinding(service_factory_.get(), |
549 std::move(request)); | 548 std::move(request)); |
550 } | 549 } |
551 | 550 |
552 } // namespace content | 551 } // namespace content |
OLD | NEW |