| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 ChildThreadImpl::OnAssociatedInterfaceRequest(name, std::move(handle)); | 261 ChildThreadImpl::OnAssociatedInterfaceRequest(name, std::move(handle)); |
| 262 } | 262 } |
| 263 | 263 |
| 264 void GpuChildThread::CreateGpuService( | 264 void GpuChildThread::CreateGpuService( |
| 265 ui::mojom::GpuServiceRequest request, | 265 ui::mojom::GpuServiceRequest request, |
| 266 ui::mojom::GpuHostPtr gpu_host, | 266 ui::mojom::GpuHostPtr gpu_host, |
| 267 const gpu::GpuPreferences& gpu_preferences, | 267 const gpu::GpuPreferences& gpu_preferences, |
| 268 mojo::ScopedSharedBufferHandle activity_flags) { | 268 mojo::ScopedSharedBufferHandle activity_flags) { |
| 269 gpu_service_->Bind(std::move(request)); | 269 gpu_service_->Bind(std::move(request)); |
| 270 gpu_service_->UpdateGPUInfoFromPreferences(gpu_preferences); | 270 gpu_service_->UpdateGPUInfoFromPreferences(gpu_preferences); |
| 271 Send(new GpuHostMsg_Initialized(!dead_on_arrival_, gpu_service_->gpu_info(), | |
| 272 gpu_service_->gpu_feature_info())); | |
| 273 for (const LogMessage& log : deferred_messages_) | 271 for (const LogMessage& log : deferred_messages_) |
| 274 gpu_host->RecordLogMessage(log.severity, log.header, log.message); | 272 gpu_host->RecordLogMessage(log.severity, log.header, log.message); |
| 275 deferred_messages_.clear(); | 273 deferred_messages_.clear(); |
| 276 | 274 |
| 277 if (dead_on_arrival_) { | 275 if (dead_on_arrival_) { |
| 278 LOG(ERROR) << "Exiting GPU process due to errors during initialization"; | 276 LOG(ERROR) << "Exiting GPU process due to errors during initialization"; |
| 279 gpu_service_.reset(); | 277 gpu_service_.reset(); |
| 280 gpu_host->DidFailInitialize(); | 278 gpu_host->DidFailInitialize(); |
| 281 base::MessageLoop::current()->QuitWhenIdle(); | 279 base::MessageLoop::current()->QuitWhenIdle(); |
| 282 return; | 280 return; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 329 |
| 332 void GpuChildThread::BindServiceFactoryRequest( | 330 void GpuChildThread::BindServiceFactoryRequest( |
| 333 service_manager::mojom::ServiceFactoryRequest request) { | 331 service_manager::mojom::ServiceFactoryRequest request) { |
| 334 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; | 332 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; |
| 335 DCHECK(service_factory_); | 333 DCHECK(service_factory_); |
| 336 service_factory_bindings_.AddBinding(service_factory_.get(), | 334 service_factory_bindings_.AddBinding(service_factory_.get(), |
| 337 std::move(request)); | 335 std::move(request)); |
| 338 } | 336 } |
| 339 | 337 |
| 340 } // namespace content | 338 } // namespace content |
| OLD | NEW |