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 58821e72b79f196d7c129b398507f31a751b6d84..809e9afa12ecc70b54296bdc24345c9c6524c5db 100644 |
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc |
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc |
@@ -21,6 +21,8 @@ |
#include "content/browser/gpu/gpu_surface_tracker.h" |
#include "content/browser/gpu/shader_disk_cache.h" |
#include "content/common/child_process_host_impl.h" |
+#include "content/common/gpu/client/ipc/chrome/chrome_gpu_channel_host_ipc_transport.h" |
+#include "content/common/gpu/gpu_create_command_buffer_config.h" |
#include "content/common/gpu/gpu_messages.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/browser/content_browser_client.h" |
@@ -293,7 +295,7 @@ BrowserGpuChannelHostFactory::AllocateSharedMemory(size_t size) { |
void BrowserGpuChannelHostFactory::CreateViewCommandBufferOnIO( |
CreateRequest* request, |
int32_t surface_id, |
- const GPUCreateCommandBufferConfig& init_params) { |
+ const GpuCreateCommandBufferConfig& init_params) { |
GpuProcessHost* host = GpuProcessHost::FromID(gpu_host_id_); |
if (!host) { |
request->event.Signal(); |
@@ -321,7 +323,7 @@ void BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO( |
CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer( |
int32_t surface_id, |
- const GPUCreateCommandBufferConfig& init_params, |
+ const GpuCreateCommandBufferConfig& init_params, |
int32_t route_id) { |
CreateRequest request(route_id); |
GetIOThreadTaskRunner()->PostTask( |
@@ -404,10 +406,15 @@ void BrowserGpuChannelHostFactory::GpuChannelEstablished() { |
FROM_HERE_WITH_EXPLICIT_FUNCTION( |
"466866 BrowserGpuChannelHostFactory::GpuChannelEstablished1")); |
GetContentClient()->SetGpuInfo(pending_request_->gpu_info()); |
- gpu_channel_ = GpuChannelHost::Create( |
- this, gpu_client_id_, pending_request_->gpu_info(), |
- pending_request_->channel_handle(), shutdown_event_.get(), |
- gpu_memory_buffer_manager_.get()); |
+ scoped_ptr<GpuChannelHostIPCTransport> transport( |
+ GpuHostIPCTransportFactory::Get()->CreateGpuChannelHostIPCTransport()); |
+ static_cast<ChromeGpuChannelHostIPCTransport*>(transport.get()) |
+ ->BindToService(this, gpu_client_id_, |
+ pending_request_->channel_handle(), |
+ shutdown_event_.get()); |
+ gpu_channel_ = GpuChannelHost::Create(std::move(transport), |
+ pending_request_->gpu_info(), |
+ gpu_memory_buffer_manager_.get()); |
} |
gpu_host_id_ = pending_request_->gpu_host_id(); |
pending_request_ = NULL; |