| Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
|
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc b/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
|
| index 58b26c7e27d29c7ff21100ee67ce59ffdab3ed82..236d2bd58606d6b6fa88f1b971cad88f6dca08f5 100644
|
| --- a/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
|
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
|
| @@ -10,7 +10,8 @@
|
| 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,
|
| @@ -18,13 +19,13 @@ void GpuMemoryBufferImpl::Create(const gfx::Size& size,
|
| if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(format,
|
| usage)) {
|
| GpuMemoryBufferImplOzoneNativeBuffer::Create(
|
| - size, format, client_id, callback);
|
| + 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;
|
| }
|
|
|
| @@ -33,6 +34,7 @@ void GpuMemoryBufferImpl::Create(const gfx::Size& size,
|
|
|
| // static
|
| void GpuMemoryBufferImpl::AllocateForChildProcess(
|
| + gfx::GpuMemoryBufferId id,
|
| const gfx::Size& size,
|
| Format format,
|
| Usage usage,
|
| @@ -42,14 +44,14 @@ void GpuMemoryBufferImpl::AllocateForChildProcess(
|
| if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(format,
|
| usage)) {
|
| GpuMemoryBufferImplOzoneNativeBuffer::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;
|
| }
|
|
|
| @@ -59,7 +61,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_t sync_point) {
|
| @@ -67,16 +69,12 @@ void GpuMemoryBufferImpl::DeletedByChildProcess(
|
| case gfx::SHARED_MEMORY_BUFFER:
|
| break;
|
| case gfx::OZONE_NATIVE_BUFFER:
|
| - if (id.secondary_id != child_client_id) {
|
| - LOG(ERROR)
|
| - << "Child attempting to delete GpuMemoryBuffer it does not own";
|
| - } else {
|
| - GpuMemoryBufferImplOzoneNativeBuffer::DeletedByChildProcess(id,
|
| - sync_point);
|
| - }
|
| + GpuMemoryBufferImplOzoneNativeBuffer::DeletedByChildProcess(
|
| + id, child_client_id, sync_point);
|
| break;
|
| default:
|
| NOTREACHED();
|
| + break;
|
| }
|
| }
|
|
|
|
|