| 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 e8ac048e15d79994ffba7017424c0f6ee753c5ae..4af6b160ddde79a1b2e7928eb33bae74954c6aae 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
|
| @@ -35,21 +35,26 @@ scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImplIOSurface::CreateFromHandle(
|
| handle.id, size, format, callback, io_surface.release()));
|
| }
|
|
|
| -void* GpuMemoryBufferImplIOSurface::Map() {
|
| +bool GpuMemoryBufferImplIOSurface::Map(void** data) {
|
| DCHECK(!mapped_);
|
| + DCHECK_EQ(num_planes_, 1u);
|
| IOSurfaceLock(io_surface_, 0, NULL);
|
| mapped_ = true;
|
| - return IOSurfaceGetBaseAddress(io_surface_);
|
| + data[0] = IOSurfaceGetBaseAddress(io_surface_);
|
| + return true;
|
| }
|
|
|
| +
|
| void GpuMemoryBufferImplIOSurface::Unmap() {
|
| DCHECK(mapped_);
|
| IOSurfaceUnlock(io_surface_, 0, NULL);
|
| mapped_ = false;
|
| }
|
|
|
| -uint32 GpuMemoryBufferImplIOSurface::GetStride() const {
|
| - return IOSurfaceGetBytesPerRow(io_surface_);
|
| +bool GpuMemoryBufferImplIOSurface::GetStride(uint32* stride) const {
|
| + DCHECK_EQ(num_planes_, 1u);
|
| + stride[0] = IOSurfaceGetBytesPerRow(io_surface_);
|
| + return true;
|
| }
|
|
|
| gfx::GpuMemoryBufferHandle GpuMemoryBufferImplIOSurface::GetHandle() const {
|
|
|