Index: content/common/gpu/gpu_channel_manager.cc |
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc |
index 1da6aecf2f3c82608fc57654592fc22c5d557c85..6c863fdcfe67cc036ad2eb5d7a372aa6687126a7 100644 |
--- a/content/common/gpu/gpu_channel_manager.cc |
+++ b/content/common/gpu/gpu_channel_manager.cc |
@@ -95,6 +95,8 @@ bool GpuChannelManager::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel, OnCloseChannel) |
IPC_MESSAGE_HANDLER(GpuMsg_CreateViewCommandBuffer, |
OnCreateViewCommandBuffer) |
+ IPC_MESSAGE_HANDLER(GpuMsg_CreateImage, OnCreateImage) |
+ IPC_MESSAGE_HANDLER(GpuMsg_DeleteImage, OnDeleteImage) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP_EX() |
return handled; |
@@ -169,6 +171,32 @@ void GpuChannelManager::OnCreateViewCommandBuffer( |
Send(new GpuHostMsg_CommandBufferCreated(route_id)); |
} |
+void GpuChannelManager::OnCreateImage( |
+ gfx::PluginWindowHandle window, |
+ int32 client_id, |
+ int32 image_id) { |
+ DCHECK(image_id); |
+ gfx::Size size; |
+ |
+ GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id); |
+ if (iter != gpu_channels_.end()) { |
+ iter->second->CreateImage(window, image_id, &size); |
+ } |
+ |
+ Send(new GpuHostMsg_ImageCreated(size)); |
+} |
+ |
+void GpuChannelManager::OnDeleteImage( |
+ int32 client_id, |
+ int32 image_id) { |
+ DCHECK(image_id); |
+ |
+ GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id); |
+ if (iter != gpu_channels_.end()) { |
+ iter->second->DeleteImage(image_id); |
+ } |
+} |
+ |
void GpuChannelManager::LoseAllContexts() { |
MessageLoop::current()->PostTask( |
FROM_HERE, |