Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: content/gpu/gpu_child_thread.cc

Issue 2109643002: Fix DCHECKs caused by in-process gpu thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698