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

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: Some final cleanup before review. 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
Index: chrome/gpu/gpu_thread.cc
diff --git a/chrome/gpu/gpu_thread.cc b/chrome/gpu/gpu_thread.cc
index 6e9b3daff9a703c8ddc7e60e455bfb08aaa1e932..e22e326ef14a56f06f7567d0675c40e72189f273 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,21 @@ 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(
apatrick 2011/01/26 19:50:05 More than one line so surround with braces.
jonathan.backer 2011/01/26 20:42:17 Done.
+ window, render_view_id, init_params, &route_id);
+
+ Send(new GpuHostMsg_CommandBufferCreated(route_id));
+}
+
void GpuThread::OnCollectGraphicsInfo() {
Send(new GpuHostMsg_GraphicsInfoCollected(gpu_info_));
}

Powered by Google App Engine
This is Rietveld 408576698