diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-05 03:07:07 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-05 03:07:07 +0000 |
commit | 4049046a39cb364577a1ac8a2aac47a86afc5b7b (patch) | |
tree | e670e88f432ee925b7b89994eff756052739af60 /chrome/renderer | |
parent | 07a174f4c159a347c6d7e10a5f3da2d5966c92d1 (diff) | |
download | chromium_src-4049046a39cb364577a1ac8a2aac47a86afc5b7b.zip chromium_src-4049046a39cb364577a1ac8a2aac47a86afc5b7b.tar.gz chromium_src-4049046a39cb364577a1ac8a2aac47a86afc5b7b.tar.bz2 |
linux: implement gpu plugin
Review URL: http://codereview.chromium.org/500132
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/command_buffer_proxy.cc | 10 |
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(); } |