| Index: content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
|
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc b/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
|
| index 33a5e0b377f78527eb2528195ca342d5f0b69e3b..c4e9a03fe77f4ff2ab85fec5e67792f271f91a7c 100644
|
| --- a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
|
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
|
| @@ -10,19 +10,20 @@
|
| namespace content {
|
|
|
| // static
|
| -void GpuMemoryBufferImpl::Create(const gfx::Size& size,
|
| +void GpuMemoryBufferImpl::Create(gfx::GpuMemoryBufferId id,
|
| + const gfx::Size& size,
|
| Format format,
|
| Usage usage,
|
| int client_id,
|
| const CreationCallback& callback) {
|
| if (GpuMemoryBufferImplIOSurface::IsConfigurationSupported(format, usage)) {
|
| - GpuMemoryBufferImplIOSurface::Create(size, format, client_id, callback);
|
| + GpuMemoryBufferImplIOSurface::Create(id, size, format, client_id, callback);
|
| return;
|
| }
|
|
|
| if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
|
| size, format, usage)) {
|
| - GpuMemoryBufferImplSharedMemory::Create(size, format, callback);
|
| + GpuMemoryBufferImplSharedMemory::Create(id, size, format, callback);
|
| return;
|
| }
|
|
|
| @@ -31,6 +32,7 @@ void GpuMemoryBufferImpl::Create(const gfx::Size& size,
|
|
|
| // static
|
| void GpuMemoryBufferImpl::AllocateForChildProcess(
|
| + gfx::GpuMemoryBufferId id,
|
| const gfx::Size& size,
|
| Format format,
|
| Usage usage,
|
| @@ -39,14 +41,14 @@ void GpuMemoryBufferImpl::AllocateForChildProcess(
|
| const AllocationCallback& callback) {
|
| if (GpuMemoryBufferImplIOSurface::IsConfigurationSupported(format, usage)) {
|
| GpuMemoryBufferImplIOSurface::AllocateForChildProcess(
|
| - size, format, child_client_id, callback);
|
| + id, size, format, child_client_id, callback);
|
| return;
|
| }
|
|
|
| if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
|
| size, format, usage)) {
|
| GpuMemoryBufferImplSharedMemory::AllocateForChildProcess(
|
| - size, format, child_process, callback);
|
| + id, size, format, child_process, callback);
|
| return;
|
| }
|
|
|
| @@ -56,7 +58,7 @@ void GpuMemoryBufferImpl::AllocateForChildProcess(
|
| // static
|
| void GpuMemoryBufferImpl::DeletedByChildProcess(
|
| gfx::GpuMemoryBufferType type,
|
| - const gfx::GpuMemoryBufferId& id,
|
| + gfx::GpuMemoryBufferId id,
|
| base::ProcessHandle child_process,
|
| int child_client_id,
|
| uint32 sync_point) {
|
| @@ -64,15 +66,12 @@ void GpuMemoryBufferImpl::DeletedByChildProcess(
|
| case gfx::SHARED_MEMORY_BUFFER:
|
| break;
|
| case gfx::IO_SURFACE_BUFFER:
|
| - if (id.secondary_id != child_client_id) {
|
| - LOG(ERROR)
|
| - << "Child attempting to delete GpuMemoryBuffer it does not own";
|
| - } else {
|
| - GpuMemoryBufferImplIOSurface::DeletedByChildProcess(id, sync_point);
|
| - }
|
| + GpuMemoryBufferImplIOSurface::DeletedByChildProcess(
|
| + id, child_client_id, sync_point);
|
| break;
|
| default:
|
| NOTREACHED();
|
| + break;
|
| }
|
| }
|
|
|
|
|