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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 gpu_service_->Bind(std::move(request)); | 273 gpu_service_->Bind(std::move(request)); |
274 gpu_service_->UpdateGPUInfoFromPreferences(gpu_preferences); | 274 gpu_service_->UpdateGPUInfoFromPreferences(gpu_preferences); |
275 Send(new GpuHostMsg_Initialized(!dead_on_arrival_, gpu_service_->gpu_info(), | 275 Send(new GpuHostMsg_Initialized(!dead_on_arrival_, gpu_service_->gpu_info(), |
276 gpu_service_->gpu_feature_info())); | 276 gpu_service_->gpu_feature_info())); |
277 for (const LogMessage& log : deferred_messages_) | 277 for (const LogMessage& log : deferred_messages_) |
278 gpu_host->RecordLogMessage(log.severity, log.header, log.message); | 278 gpu_host->RecordLogMessage(log.severity, log.header, log.message); |
279 deferred_messages_.clear(); | 279 deferred_messages_.clear(); |
280 | 280 |
281 if (dead_on_arrival_) { | 281 if (dead_on_arrival_) { |
282 LOG(ERROR) << "Exiting GPU process due to errors during initialization"; | 282 LOG(ERROR) << "Exiting GPU process due to errors during initialization"; |
| 283 gpu_service_.reset(); |
283 base::MessageLoop::current()->QuitWhenIdle(); | 284 base::MessageLoop::current()->QuitWhenIdle(); |
284 return; | 285 return; |
285 } | 286 } |
286 | 287 |
287 gpu::SyncPointManager* sync_point_manager = nullptr; | 288 gpu::SyncPointManager* sync_point_manager = nullptr; |
288 // Note SyncPointManager from ContentGpuClient cannot be owned by this. | 289 // Note SyncPointManager from ContentGpuClient cannot be owned by this. |
289 if (GetContentClient()->gpu()) | 290 if (GetContentClient()->gpu()) |
290 sync_point_manager = GetContentClient()->gpu()->GetSyncPointManager(); | 291 sync_point_manager = GetContentClient()->gpu()->GetSyncPointManager(); |
291 gpu_service_->InitializeWithHost( | 292 gpu_service_->InitializeWithHost( |
292 std::move(gpu_host), gpu_preferences, | 293 std::move(gpu_host), gpu_preferences, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 334 |
334 void GpuChildThread::BindServiceFactoryRequest( | 335 void GpuChildThread::BindServiceFactoryRequest( |
335 service_manager::mojom::ServiceFactoryRequest request) { | 336 service_manager::mojom::ServiceFactoryRequest request) { |
336 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; | 337 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; |
337 DCHECK(service_factory_); | 338 DCHECK(service_factory_); |
338 service_factory_bindings_.AddBinding(service_factory_.get(), | 339 service_factory_bindings_.AddBinding(service_factory_.get(), |
339 std::move(request)); | 340 std::move(request)); |
340 } | 341 } |
341 | 342 |
342 } // namespace content | 343 } // namespace content |
OLD | NEW |