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

Unified Diff: chrome/gpu/gpu_thread.cc

Issue 6343006: Route IPC through browser when creating a viewable command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 9 years, 11 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 | « chrome/gpu/gpu_thread.h ('k') | chrome/renderer/ggl/ggl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_thread.cc
diff --git a/chrome/gpu/gpu_thread.cc b/chrome/gpu/gpu_thread.cc
index 6e9b3daff9a703c8ddc7e60e455bfb08aaa1e932..13d1ec1b9568f9e0110f0a9786995f81038ce46c 100644
--- a/chrome/gpu/gpu_thread.cc
+++ b/chrome/gpu/gpu_thread.cc
@@ -69,6 +69,8 @@ bool GpuThread::OnControlMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(GpuMsg_Initialize, OnInitialize)
IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel, OnEstablishChannel)
IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel, OnCloseChannel)
+ IPC_MESSAGE_HANDLER(GpuMsg_CreateViewCommandBuffer,
+ OnCreateViewCommandBuffer);
IPC_MESSAGE_HANDLER(GpuMsg_Synchronize, OnSynchronize)
IPC_MESSAGE_HANDLER(GpuMsg_CollectGraphicsInfo, OnCollectGraphicsInfo)
#if defined(OS_MACOSX)
@@ -208,6 +210,22 @@ void GpuThread::OnSynchronize() {
Send(new GpuHostMsg_SynchronizeReply());
}
+void GpuThread::OnCreateViewCommandBuffer(
+ gfx::PluginWindowHandle window,
+ int32 render_view_id,
+ int32 renderer_id,
+ const GPUCreateCommandBufferConfig& init_params) {
+ int32 route_id = MSG_ROUTING_NONE;
+
+ GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id);
+ if (iter != gpu_channels_.end()) {
+ iter->second->CreateViewCommandBuffer(
+ window, render_view_id, init_params, &route_id);
+ }
+
+ Send(new GpuHostMsg_CommandBufferCreated(route_id));
+}
+
void GpuThread::OnCollectGraphicsInfo() {
Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
}
« no previous file with comments | « chrome/gpu/gpu_thread.h ('k') | chrome/renderer/ggl/ggl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698