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 40500a604f8a10ed40790cccb67a61348d455023..7ac3bac51b5e9206993346ea06125f8bf91430c1 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 |
| @@ -36,11 +36,15 @@ GpuMemoryBufferImplOzoneNativePixmap::CreateFromHandle( |
| } |
| bool GpuMemoryBufferImplOzoneNativePixmap::Map(void** data) { |
| - return pixmap_->Map(data); |
| + bool result = pixmap_->Map(data); |
| + if (result) |
|
reveman
2015/08/11 20:15:16
can we DCHECK(result) instead?
dshwang
2015/08/12 08:57:35
Yes, done.
|
| + mapped_ = true; |
| + return result; |
| } |
| void GpuMemoryBufferImplOzoneNativePixmap::Unmap() { |
| pixmap_->Unmap(); |
| + mapped_ = false; |
| } |
| void GpuMemoryBufferImplOzoneNativePixmap::GetStride(int* stride) const { |