| Index: content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc
|
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc b/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc
|
| index 9e46404a58f91d4123e9588e57d757a27e76fc88..bbe9604a9b8985fa4e33334dbcc79efddacb4a7b 100644
|
| --- a/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc
|
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl_io_surface.cc
|
| @@ -26,8 +26,12 @@ void GpuMemoryBufferCreated(
|
| gfx::GpuMemoryBuffer::Format format,
|
| const GpuMemoryBufferImpl::CreationCallback& callback,
|
| const gfx::GpuMemoryBufferHandle& handle) {
|
| - DCHECK_EQ(gfx::IO_SURFACE_BUFFER, handle.type);
|
| + if (handle.is_null()) {
|
| + callback.Run(scoped_ptr<GpuMemoryBufferImpl>());
|
| + return;
|
| + }
|
|
|
| + DCHECK_EQ(gfx::IO_SURFACE_BUFFER, handle.type);
|
| callback.Run(GpuMemoryBufferImplIOSurface::CreateFromHandle(
|
| handle, size, format, base::Bind(&GpuMemoryBufferDeleted, handle)));
|
| }
|
| @@ -35,7 +39,7 @@ void GpuMemoryBufferCreated(
|
| void GpuMemoryBufferCreatedForChildProcess(
|
| const GpuMemoryBufferImpl::AllocationCallback& callback,
|
| const gfx::GpuMemoryBufferHandle& handle) {
|
| - DCHECK_EQ(gfx::IO_SURFACE_BUFFER, handle.type);
|
| + DCHECK_IMPLIES(!handle.is_null(), gfx::IO_SURFACE_BUFFER == handle.type);
|
|
|
| callback.Run(handle);
|
| }
|
|
|