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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 10543125: gpu: Add support for GLX_EXT_texture_from_pixmap extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move CreateGLImage below virtual methods. Created 8 years, 2 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: 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,

Powered by Google App Engine
This is Rietveld 408576698