Land 9348117: (Aura) use GPU process for UI
This is behind a flag (--ui-use-gpu-process).
Currently problems occur when the GPU process crash, this will be handled in a follow-up CL.
BUG=99516
TEST=chrome --ui-use-gpu-process (with an aura build)
TBR=sky,jam,apatrick
Review URL: https://chromiumcodereview.appspot.com/9442017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123473 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 5d4e77b..f43855f5 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -856,18 +856,16 @@
return GetGpuChannel();
// Recreate the channel if it has been lost.
- if (gpu_channel_->state() == GpuChannelHost::kLost)
- gpu_channel_ = NULL;
+ gpu_channel_ = NULL;
}
- if (!gpu_channel_.get())
- gpu_channel_ = new GpuChannelHost(this);
-
// Ask the browser for the channel name.
+ int client_id = 0;
IPC::ChannelHandle channel_handle;
base::ProcessHandle renderer_process_for_gpu;
content::GPUInfo gpu_info;
if (!Send(new GpuHostMsg_EstablishGpuChannel(cause_for_gpu_launch,
+ &client_id,
&channel_handle,
&renderer_process_for_gpu,
&gpu_info)) ||
@@ -881,6 +879,7 @@
return NULL;
}
+ gpu_channel_ = new GpuChannelHost(this, client_id);
gpu_channel_->set_gpu_info(gpu_info);
content::GetContentClient()->SetGpuInfo(gpu_info);