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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1656433002: Sample code: IPC Transport object for GPU Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GpuMemoryBufferService + Transport object. TODO: Eliminate ChildThreadImpl dependency Created 4 years, 10 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 | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 880180111f94da26ddac98d0a3112e543ef8ce1e..02818403c18c13e9038952aa0376d0aed03b161c 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -75,6 +75,7 @@
#include "content/common/frame_messages.h"
#include "content/common/gpu/client/context_provider_command_buffer.h"
#include "content/common/gpu/client/gpu_channel_host.h"
+#include "content/common/gpu/client/ipc/chrome/chrome_gpu_channel_host_ipc_transport.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/gpu/gpu_process_launch_causes.h"
#include "content/common/render_frame_setup.mojom.h"
@@ -1700,7 +1701,7 @@ scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory(
CreateCommandBufferResult RenderThreadImpl::CreateViewCommandBuffer(
int32_t surface_id,
- const GPUCreateCommandBufferConfig& init_params,
+ const GpuCreateCommandBufferConfig& init_params,
int32_t route_id) {
NOTREACHED();
return CREATE_COMMAND_BUFFER_FAILED;
@@ -1843,13 +1844,14 @@ GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync(
// implementation of GpuChannelHostFactory.
io_thread_task_runner_ = ChildProcess::current()->io_task_runner();
- gpu_channel_ =
- GpuChannelHost::Create(this,
- client_id,
- gpu_info,
- channel_handle,
- ChildProcess::current()->GetShutDownEvent(),
- gpu_memory_buffer_manager());
+ scoped_ptr<GpuChannelHostIPCTransport> transport(
+ GpuHostIPCTransportFactory::Get()->CreateGpuChannelHostIPCTransport());
+ static_cast<ChromeGpuChannelHostIPCTransport*>(transport.get())
+ ->BindToService(this, client_id, channel_handle,
+ ChildProcess::current()->GetShutDownEvent());
+
+ gpu_channel_ = GpuChannelHost::Create(std::move(transport), gpu_info,
+ gpu_memory_buffer_manager());
return gpu_channel_.get();
}
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698