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

Unified Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 2127693002: Use ChannelMojo for GpuChannels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-channel-gpu
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_channel_host_factory.cc
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
index 90646943a4ff49d45e82400bd8f91cec22560901..e71f1a96875d523f0adcc75cd5c453a63673908c 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -153,7 +153,7 @@ void BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO() {
void BrowserGpuChannelHostFactory::EstablishRequest::OnEstablishedOnIO(
const IPC::ChannelHandle& channel_handle,
const gpu::GPUInfo& gpu_info) {
- if (channel_handle.name.empty() && reused_gpu_process_) {
+ if (!channel_handle.mojo_handle.is_valid() && reused_gpu_process_) {
// We failed after re-using the GPU process, but it may have died in the
// mean time. Retry to have a chance to create a fresh GPU process.
DVLOG(1) << "Failed to create channel on existing GPU process. Trying to "
@@ -337,7 +337,7 @@ gpu::GpuChannelHost* BrowserGpuChannelHostFactory::GetGpuChannel() {
void BrowserGpuChannelHostFactory::GpuChannelEstablished() {
DCHECK(IsMainThread());
DCHECK(pending_request_.get());
- if (pending_request_->channel_handle().name.empty()) {
+ if (!pending_request_->channel_handle().mojo_handle.is_valid()) {
DCHECK(!gpu_channel_.get());
} else {
// TODO(robliao): Remove ScopedTracker below once https://crbug.com/466866
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698