diff options
author | erikchen <erikchen@chromium.org> | 2015-06-02 17:26:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-03 00:27:22 +0000 |
commit | 2096f624841f5c4c3a54163178ee0e6e2caacdcf (patch) | |
tree | 3afa552c621547b7cefae559e8d7bffefda6c556 /gpu | |
parent | 6bb8de49e503e4b53e7822418e682ade926c070f (diff) | |
download | chromium_src-2096f624841f5c4c3a54163178ee0e6e2caacdcf.zip chromium_src-2096f624841f5c4c3a54163178ee0e6e2caacdcf.tar.gz chromium_src-2096f624841f5c4c3a54163178ee0e6e2caacdcf.tar.bz2 |
Several small changes to base::SharedMemory.
- Removed ShallowCopyHandle().
- Renamed DeepCopyHandle() -> DuplicateHandle().
- Changed the signature of DuplicateHandle() to not accept
|clean_up_resources_on_destruction|. (The flag has no effect on
base::SharedMemory).
- Defined DuplicateHandle() on Win, POSIX, and Nacl.
BUG=466437
Review URL: https://codereview.chromium.org/1160503004
Cr-Commit-Position: refs/heads/master@{#332506}
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/in_process_command_buffer.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc index 9e1f3e5..5b325ab 100644 --- a/gpu/command_buffer/service/in_process_command_buffer.cc +++ b/gpu/command_buffer/service/in_process_command_buffer.cc @@ -196,23 +196,7 @@ base::LazyInstance<SyncPointManagerWrapper> g_sync_point_manager = base::SharedMemoryHandle ShareToGpuThread( base::SharedMemoryHandle source_handle) { -#if defined(OS_WIN) - // Windows needs to explicitly duplicate the handle to current process. - base::SharedMemoryHandle target_handle; - if (!DuplicateHandle(GetCurrentProcess(), - source_handle, - GetCurrentProcess(), - &target_handle, - FILE_GENERIC_READ | FILE_GENERIC_WRITE, - FALSE, - 0)) { - return base::SharedMemory::NULLHandle(); - } - - return target_handle; -#else - return base::SharedMemory::DeepCopyHandle(source_handle, true); -#endif + return base::SharedMemory::DuplicateHandle(source_handle); } gfx::GpuMemoryBufferHandle ShareGpuMemoryBufferToGpuThread( |