| Index: content/common/gpu/client/gpu_memory_buffer_impl_android.cc
|
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_android.cc b/content/common/gpu/client/gpu_memory_buffer_impl_android.cc
|
| index 0b8a2892d99dc694067aa1851acee676393d59af..9c0fdb368c67b02d9bb7ac985828663d7b6ccf16 100644
|
| --- a/content/common/gpu/client/gpu_memory_buffer_impl_android.cc
|
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl_android.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 (GpuMemoryBufferImplSurfaceTexture::IsConfigurationSupported(format,
|
| usage)) {
|
| GpuMemoryBufferImplSurfaceTexture::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 (GpuMemoryBufferImplSurfaceTexture::IsConfigurationSupported(format,
|
| usage)) {
|
| GpuMemoryBufferImplSurfaceTexture::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 sync_point) {
|
| @@ -67,16 +69,12 @@ void GpuMemoryBufferImpl::DeletedByChildProcess(
|
| case gfx::SHARED_MEMORY_BUFFER:
|
| break;
|
| case gfx::SURFACE_TEXTURE_BUFFER:
|
| - if (id.secondary_id != child_client_id) {
|
| - LOG(ERROR)
|
| - << "Child attempting to delete GpuMemoryBuffer it does not own";
|
| - } else {
|
| - GpuMemoryBufferImplSurfaceTexture::DeletedByChildProcess(id,
|
| - sync_point);
|
| - }
|
| + GpuMemoryBufferImplSurfaceTexture::DeletedByChildProcess(
|
| + id, child_client_id, sync_point);
|
| break;
|
| default:
|
| NOTREACHED();
|
| + break;
|
| }
|
| }
|
|
|
|
|