diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-26 02:07:57 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-26 02:07:57 +0000 |
commit | 7df1d1a5e09f0b4cbdafeddeb792960c91b31f31 (patch) | |
tree | 2ff3a085e809dda829055f6b5a889e3e99323151 /chrome/gpu | |
parent | d8e215b8c5f41e626c86ddc402679396df8a0a0c (diff) | |
download | chromium_src-7df1d1a5e09f0b4cbdafeddeb792960c91b31f31.zip chromium_src-7df1d1a5e09f0b4cbdafeddeb792960c91b31f31.tar.gz chromium_src-7df1d1a5e09f0b4cbdafeddeb792960c91b31f31.tar.bz2 |
Avoid deleting GPU transfer buffers twice on POSIX.
TEST=trybots, run WebGL on windows and mac locally.
BUG=none
Review URL: http://codereview.chromium.org/6591015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r-- | chrome/gpu/gpu_command_buffer_stub.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/gpu/gpu_command_buffer_stub.cc b/chrome/gpu/gpu_command_buffer_stub.cc index 5c369eb..5b81d22 100644 --- a/chrome/gpu/gpu_command_buffer_stub.cc +++ b/chrome/gpu/gpu_command_buffer_stub.cc @@ -296,12 +296,17 @@ void GpuCommandBufferStub::OnRegisterTransferBuffer( size_t size, int32* id) { #if defined(OS_WIN) + // Windows dups the shared memory handle it receives into the current process + // and closes it when this variable goes out of scope. base::SharedMemory shared_memory(transfer_buffer, false, channel_->renderer_process()); #else + // POSIX receives a dup of the shared memory handle and closes the dup when + // this variable goes out of scope. base::SharedMemory shared_memory(transfer_buffer, false); #endif + *id = command_buffer_->RegisterTransferBuffer(&shared_memory, size); } |