summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/webplugin_delegate_proxy.cc
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 21:53:50 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 21:53:50 +0000
commit246a7045b9c45620fd725210aac51322e611c83f (patch)
tree6bdce605ae758c282a2b27e92a6b223d98b8d46a /chrome/renderer/webplugin_delegate_proxy.cc
parentc3240722a63ff142684575e3ea4eb89915edae72 (diff)
downloadchromium_src-246a7045b9c45620fd725210aac51322e611c83f.zip
chromium_src-246a7045b9c45620fd725210aac51322e611c83f.tar.gz
chromium_src-246a7045b9c45620fd725210aac51322e611c83f.tar.bz2
Added support for opening a GPU command buffer from a renderer processes through a GPU channel.
Probably only works in windows only so far. TEST=none BUG=none Review URL: http://codereview.chromium.org/657046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40783 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webplugin_delegate_proxy.cc')
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 4157a1f..1e64648 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -1280,12 +1280,25 @@ CommandBufferProxy* WebPluginDelegateProxy::CreateCommandBuffer() {
return NULL;
}
- return new CommandBufferProxy(channel_host_, command_buffer_id);
+ CommandBufferProxy* command_buffer =
+ new CommandBufferProxy(channel_host_, command_buffer_id);
+ channel_host_->AddRoute(command_buffer_id, command_buffer, NULL);
+ return command_buffer;
#else
return NULL;
#endif // ENABLE_GPU
}
+void WebPluginDelegateProxy::DestroyCommandBuffer(
+ CommandBufferProxy* command_buffer) {
+ DCHECK(command_buffer);
+#if defined(ENABLE_GPU)
+ Send(new PluginMsg_DestroyCommandBuffer(instance_id_));
+ channel_host_->RemoveRoute(command_buffer->route_id());
+ delete command_buffer;
+#endif
+}
+
gfx::PluginWindowHandle WebPluginDelegateProxy::GetPluginWindowHandle() {
return window_;
}