summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/command_buffer_proxy.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 04:38:55 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 04:38:55 +0000
commitbe4f188066196d7bd0a4a7a62254bb603e566f74 (patch)
treea493671ea3e09fec3d20c86a0e452d509e7c9954 /chrome/renderer/command_buffer_proxy.cc
parentee3cd175f8592b2b1f2ccd14b071d56ca733a5c6 (diff)
downloadchromium_src-be4f188066196d7bd0a4a7a62254bb603e566f74.zip
chromium_src-be4f188066196d7bd0a4a7a62254bb603e566f74.tar.gz
chromium_src-be4f188066196d7bd0a4a7a62254bb603e566f74.tar.bz2
linux: implement gpu plugin
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35509 Review URL: http://codereview.chromium.org/500132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/command_buffer_proxy.cc')
-rw-r--r--chrome/renderer/command_buffer_proxy.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/renderer/command_buffer_proxy.cc b/chrome/renderer/command_buffer_proxy.cc
index b78fa84..3b68cc2 100644
--- a/chrome/renderer/command_buffer_proxy.cc
+++ b/chrome/renderer/command_buffer_proxy.cc
@@ -153,12 +153,20 @@ Buffer CommandBufferProxy::GetTransferBuffer(int32 id) {
}
// Cache the transfer buffer shared memory object client side.
+#if defined(OS_WIN)
+ // TODO(piman): Does Windows needs this version of the constructor ? It
+ // duplicates the handle, but I'm not sure why it is necessary - it was
+ // already duped by the CommandBufferStub.
base::SharedMemory* shared_memory =
new base::SharedMemory(handle, false, base::GetCurrentProcessHandle());
+#else
+ base::SharedMemory* shared_memory =
+ new base::SharedMemory(handle, false);
+#endif
// Map the shared memory on demand.
if (!shared_memory->memory()) {
- if (!shared_memory->Map(shared_memory->max_size())) {
+ if (!shared_memory->Map(size)) {
delete shared_memory;
return Buffer();
}