| Index: gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.cc
|
| diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.cc b/gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.cc
|
| index a6fe210ec306eda4a8e1314dc82dbb9e47022596..c2b00752c0f4d8c2f73e1e2d33be866ded4bc585 100644
|
| --- a/gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.cc
|
| +++ b/gpu/ipc/service/gpu_memory_buffer_factory_ozone_native_pixmap.cc
|
| @@ -42,9 +42,26 @@ GpuMemoryBufferFactoryOzoneNativePixmap::CreateGpuMemoryBuffer(
|
| new_handle.type = gfx::OZONE_NATIVE_PIXMAP;
|
| new_handle.id = id;
|
| new_handle.native_pixmap_handle = pixmap->ExportHandle();
|
| +
|
| + // TODO(reveman): Remove this once crbug.com/628334 has been fixed.
|
| + {
|
| + base::AutoLock lock(native_pixmaps_lock_);
|
| + NativePixmapMapKey key(id.id, client_id);
|
| + DCHECK(native_pixmaps_.find(key) == native_pixmaps_.end());
|
| + native_pixmaps_[key] = pixmap;
|
| + }
|
| +
|
| return new_handle;
|
| }
|
|
|
| +void GpuMemoryBufferFactoryOzoneNativePixmap::DestroyGpuMemoryBuffer(
|
| + gfx::GpuMemoryBufferId id,
|
| + int client_id) {
|
| + base::AutoLock lock(native_pixmaps_lock_);
|
| + NativePixmapMapKey key(id.id, client_id);
|
| + native_pixmaps_.erase(key);
|
| +}
|
| +
|
| ImageFactory* GpuMemoryBufferFactoryOzoneNativePixmap::AsImageFactory() {
|
| return this;
|
| }
|
|
|