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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 in_browser_process_(true), | 175 in_browser_process_(true), |
176 gpu_memory_buffer_factory_(gpu_memory_buffer_factory) { | 176 gpu_memory_buffer_factory_(gpu_memory_buffer_factory) { |
177 #if defined(OS_WIN) | 177 #if defined(OS_WIN) |
178 target_services_ = NULL; | 178 target_services_ = NULL; |
179 #endif | 179 #endif |
180 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( | 180 DCHECK(base::CommandLine::ForCurrentProcess()->HasSwitch( |
181 switches::kSingleProcess) || | 181 switches::kSingleProcess) || |
182 base::CommandLine::ForCurrentProcess()->HasSwitch( | 182 base::CommandLine::ForCurrentProcess()->HasSwitch( |
183 switches::kInProcessGPU)); | 183 switches::kInProcessGPU)); |
184 | 184 |
185 #if defined(USE_OZONE) | |
rjkroege
2016/09/12 20:39:12
you shouldn't need this here.
fwang
2016/09/13 13:49:19
There is a comment in gpu_main.cc:
"With in-proce
| |
186 ui::OzonePlatform::InitParams ozoneInitParams; | |
187 ozoneInitParams.connector = nullptr; | |
188 ozoneInitParams.single_process = true; | |
189 ui::OzonePlatform::InitializeForGPU(ozoneInitParams); | |
190 #endif | |
191 | |
185 if (!gl::init::InitializeGLOneOff()) | 192 if (!gl::init::InitializeGLOneOff()) |
186 VLOG(1) << "gl::init::InitializeGLOneOff failed"; | 193 VLOG(1) << "gl::init::InitializeGLOneOff failed"; |
187 | 194 |
188 g_thread_safe_sender.Get() = thread_safe_sender(); | 195 g_thread_safe_sender.Get() = thread_safe_sender(); |
189 } | 196 } |
190 | 197 |
191 GpuChildThread::~GpuChildThread() { | 198 GpuChildThread::~GpuChildThread() { |
192 while (!deferred_messages_.empty()) { | 199 while (!deferred_messages_.empty()) { |
193 delete deferred_messages_.front(); | 200 delete deferred_messages_.front(); |
194 deferred_messages_.pop(); | 201 deferred_messages_.pop(); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
544 | 551 |
545 void GpuChildThread::BindServiceFactoryRequest( | 552 void GpuChildThread::BindServiceFactoryRequest( |
546 shell::mojom::ServiceFactoryRequest request) { | 553 shell::mojom::ServiceFactoryRequest request) { |
547 DVLOG(1) << "GPU: Binding shell::mojom::ServiceFactoryRequest"; | 554 DVLOG(1) << "GPU: Binding shell::mojom::ServiceFactoryRequest"; |
548 DCHECK(service_factory_); | 555 DCHECK(service_factory_); |
549 service_factory_bindings_.AddBinding(service_factory_.get(), | 556 service_factory_bindings_.AddBinding(service_factory_.get(), |
550 std::move(request)); | 557 std::move(request)); |
551 } | 558 } |
552 | 559 |
553 } // namespace content | 560 } // namespace content |
OLD | NEW |