Index: ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc |
diff --git a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc |
index 8d6d8142f625618a42b86d447ecd843bb6ef4159..bc81a9995d573f2fc5c696080dff27a23be3ff16 100644 |
--- a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc |
+++ b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc |
@@ -151,22 +151,29 @@ void GpuMemoryBufferFactoryOzoneNativeBuffer::DestroyGpuMemoryBuffer( |
scoped_refptr<gfx::GLImage> |
GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForGpuMemoryBuffer( |
- gfx::GpuMemoryBufferId id, |
+ const std::vector<gfx::GpuMemoryBufferId>& ids, |
const gfx::Size& size, |
- gfx::GpuMemoryBuffer::Format format, |
+ const std::vector<gfx::GpuMemoryBuffer::Format>& formats, |
unsigned internalformat, |
int client_id) { |
+ // TODO(emircan): See http://crbug.com/439520; support passing multiple |
+ // buffers when new multi-planar formats are added. |
+ if ((ids.size() != 1) || (formats.size() != 1)) { |
+ NOTIMPLEMENTED(); |
+ return scoped_refptr<gfx::GLImage>(); |
+ } |
+ |
NativePixmap* pixmap = nullptr; |
{ |
base::AutoLock lock(native_pixmap_map_lock_); |
BufferToPixmapMap::iterator it = |
- native_pixmap_map_.find(GetIndex(id, client_id)); |
+ native_pixmap_map_.find(GetIndex(ids[0], client_id)); |
if (it == native_pixmap_map_.end()) { |
return scoped_refptr<gfx::GLImage>(); |
} |
pixmap = it->second.get(); |
} |
- return CreateImageForPixmap(pixmap, size, format, internalformat); |
+ return CreateImageForPixmap(pixmap, size, formats[0], internalformat); |
} |
scoped_refptr<gfx::GLImage> |