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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 if (watchdog_thread_->message_loop()) | 497 if (watchdog_thread_->message_loop()) |
498 watchdog_thread_->PostAcknowledge(); | 498 watchdog_thread_->PostAcknowledge(); |
499 // Prevent rearming. | 499 // Prevent rearming. |
500 watchdog_thread_->Stop(); | 500 watchdog_thread_->Stop(); |
501 } | 501 } |
502 } | 502 } |
503 | 503 |
504 void GpuChildThread::OnGpuSwitched() { | 504 void GpuChildThread::OnGpuSwitched() { |
505 DVLOG(1) << "GPU: GPU has switched"; | 505 DVLOG(1) << "GPU: GPU has switched"; |
506 // Notify observers in the GPU process. | 506 // Notify observers in the GPU process. |
507 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); | 507 if (!in_browser_process_) |
| 508 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); |
508 } | 509 } |
509 | 510 |
510 void GpuChildThread::OnEstablishChannel(const EstablishChannelParams& params) { | 511 void GpuChildThread::OnEstablishChannel(const EstablishChannelParams& params) { |
511 if (!gpu_channel_manager_) | 512 if (!gpu_channel_manager_) |
512 return; | 513 return; |
513 | 514 |
514 IPC::ChannelHandle channel_handle = gpu_channel_manager_->EstablishChannel( | 515 IPC::ChannelHandle channel_handle = gpu_channel_manager_->EstablishChannel( |
515 params.client_id, params.client_tracing_id, params.preempts, | 516 params.client_id, params.client_tracing_id, params.preempts, |
516 params.allow_view_command_buffers, params.allow_real_time_streams); | 517 params.allow_view_command_buffers, params.allow_real_time_streams); |
517 media_service_->AddChannel(params.client_id); | 518 media_service_->AddChannel(params.client_id); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 | 558 |
558 void GpuChildThread::BindProcessControlRequest( | 559 void GpuChildThread::BindProcessControlRequest( |
559 mojo::InterfaceRequest<mojom::ProcessControl> request) { | 560 mojo::InterfaceRequest<mojom::ProcessControl> request) { |
560 DVLOG(1) << "GPU: Binding ProcessControl request"; | 561 DVLOG(1) << "GPU: Binding ProcessControl request"; |
561 DCHECK(process_control_); | 562 DCHECK(process_control_); |
562 process_control_bindings_.AddBinding(process_control_.get(), | 563 process_control_bindings_.AddBinding(process_control_.get(), |
563 std::move(request)); | 564 std::move(request)); |
564 } | 565 } |
565 | 566 |
566 } // namespace content | 567 } // namespace content |
OLD | NEW |