| 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 e4de3983dc711f3cb9af0b60791645de06257727..4d233c6fbf688892c18f1206d8e64f4d099e4b6d 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;
|
| }
|
|
|