Index: content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc |
diff --git a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc |
index d3e0576124a9be60c8f6e67f2dddfbc0ca0f63d8..2572162d3badd575ed05e8d35e38b3c07a2dd2e6 100644 |
--- a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc |
+++ b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc |
@@ -5,6 +5,7 @@ |
#include "content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h" |
#include "ui/gl/gl_image_ozone_native_pixmap.h" |
+#include "ui/ozone/public/client_native_pixmap.h" |
#include "ui/ozone/public/client_native_pixmap_factory.h" |
#include "ui/ozone/public/ozone_platform.h" |
#include "ui/ozone/public/surface_factory_ozone.h" |
@@ -70,15 +71,20 @@ GpuMemoryBufferFactoryOzoneNativePixmap::CreateGpuMemoryBuffer( |
<< ", usage " << static_cast<int>(usage); |
return gfx::GpuMemoryBufferHandle(); |
} |
- base::AutoLock lock(native_pixmaps_lock_); |
- NativePixmapMapKey key(id, client_id); |
- DCHECK(native_pixmaps_.find(key) == native_pixmaps_.end()) |
- << "pixmap with this key must not exist"; |
- native_pixmaps_[key] = pixmap; |
gfx::GpuMemoryBufferHandle handle; |
handle.type = gfx::OZONE_NATIVE_PIXMAP; |
handle.id = id; |
+ handle.native_pixmap_handle = pixmap->ExportHandle(); |
+ |
+ { |
+ base::AutoLock lock(native_pixmaps_lock_); |
+ NativePixmapMapKey key(id, client_id); |
+ DCHECK(native_pixmaps_.find(key) == native_pixmaps_.end()) |
+ << "pixmap with this key must not exist"; |
+ native_pixmaps_[key] = pixmap; |
+ } |
+ |
return handle; |
} |