| Index: content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
|
| diff --git a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
|
| index b10fd00dfbc98f756bbb68ba087dd49dc8d1f0fa..4f87c8a7beaa25243990221770cacf476e8c68df 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
|
| @@ -69,12 +69,23 @@ gpu::ImageFactory* GpuMemoryBufferFactorySharedMemory::AsImageFactory() {
|
| }
|
|
|
| scoped_refptr<gfx::GLImage>
|
| -GpuMemoryBufferFactorySharedMemory::CreateImageForGpuMemoryBuffer(
|
| - const gfx::GpuMemoryBufferHandle& handle,
|
| +GpuMemoryBufferFactorySharedMemory::CreateImageForGpuMemoryBuffers(
|
| + const std::vector<gfx::GpuMemoryBufferHandle>& handles,
|
| 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.
|
| + size_t num_buffers =
|
| + gpu::ImageFactory::NumberOfPlanesForImageFormat(internalformat);
|
| + if (num_buffers != 1) {
|
| + NOTIMPLEMENTED();
|
| + return scoped_refptr<gfx::GLImage>();
|
| + }
|
| + const gfx::GpuMemoryBufferHandle& handle = handles[0];
|
| + const gfx::GpuMemoryBuffer::Format format = formats[0];
|
| +
|
| scoped_refptr<gfx::GLImageSharedMemory> image(
|
| new gfx::GLImageSharedMemory(size, internalformat));
|
| if (!image->Initialize(handle, format))
|
|
|