Chromium Code Reviews| Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc |
| diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc |
| index 16c8d7f9842d95044f4404cd7a0d161139469d4a..e94413dc2a20ad7093171e36a1760812f5857e61 100644 |
| --- a/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc |
| +++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc |
| @@ -29,7 +29,7 @@ GpuMemoryBufferImplOzoneNativePixmap::CreateFromHandle( |
| const DestructionCallback& callback) { |
| scoped_ptr<ui::ClientNativePixmap> native_pixmap = |
| ui::ClientNativePixmapFactory::GetInstance()->ImportFromHandle( |
| - handle.native_pixmap_handle, size, format, usage); |
| + handle.native_pixmap_handle, size, usage); |
| DCHECK(native_pixmap); |
| return make_scoped_ptr<GpuMemoryBufferImpl>( |
| new GpuMemoryBufferImplOzoneNativePixmap(handle.id, size, format, |
| @@ -37,11 +37,14 @@ GpuMemoryBufferImplOzoneNativePixmap::CreateFromHandle( |
| } |
| bool GpuMemoryBufferImplOzoneNativePixmap::Map(void** data) { |
| - return pixmap_->Map(data); |
| + mapped_ = pixmap_->Map(data); |
| + DCHECK(mapped_); |
| + return mapped_; |
| } |
| void GpuMemoryBufferImplOzoneNativePixmap::Unmap() { |
| pixmap_->Unmap(); |
|
no sievers
2015/08/18 19:05:49
so do you still want to call pixmap_->Unmap() here
dshwang
2015/08/19 07:02:59
it's checked inside pixmap_->Unmap(), so I didn't
reveman
2015/08/19 09:09:50
You should probably remove the return type from Pi
dshwang
2015/08/19 13:11:03
Done.
|
| + mapped_ = false; |
| } |
| void GpuMemoryBufferImplOzoneNativePixmap::GetStride(int* stride) const { |