Index: content/common/gpu/gpu_channel.cc |
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc |
index c12c762c6004f725973182513535274cc6ac2cc7..013356c148e8a04efc455ed27f9e259ddd70a21a 100644 |
--- a/content/common/gpu/gpu_channel.cc |
+++ b/content/common/gpu/gpu_channel.cc |
@@ -828,10 +828,20 @@ uint64 GpuChannel::GetMemoryUsage() { |
} |
scoped_refptr<gfx::GLImage> GpuChannel::CreateImageForGpuMemoryBuffer( |
- const gfx::GpuMemoryBufferHandle& handle, |
+ const std::vector<gfx::GpuMemoryBufferHandle>& handles, |
const gfx::Size& size, |
- gfx::GpuMemoryBuffer::Format format, |
+ const std::vector<gfx::GpuMemoryBuffer::Format>& formats, |
uint32 internalformat) { |
+ // TODO(emircan): See http://crbug.com/439520; support passing multiple |
reveman
2015/03/05 19:35:32
Sorry if I didn't make this clear but I don't want
emircan
2015/03/09 21:07:22
Ok, going all the way :) I got some advice to keep
|
+ // buffers when new multi-planar formats are added. |
+ if ((handles.size() != 1) || (formats.size() != 1)) { |
+ NOTIMPLEMENTED(); |
+ return scoped_refptr<gfx::GLImage>(); |
+ } |
+ |
+ const gfx::GpuMemoryBufferHandle& handle = handles[0]; |
+ const gfx::GpuMemoryBuffer::Format& format = formats[0]; |
+ |
switch (handle.type) { |
case gfx::SHARED_MEMORY_BUFFER: { |
scoped_refptr<gfx::GLImageSharedMemory> image( |
@@ -848,9 +858,9 @@ scoped_refptr<gfx::GLImage> GpuChannel::CreateImageForGpuMemoryBuffer( |
return manager->gpu_memory_buffer_factory() |
->AsImageFactory() |
- ->CreateImageForGpuMemoryBuffer(handle, |
+ ->CreateImageForGpuMemoryBuffer(handles, |
size, |
- format, |
+ formats, |
internalformat, |
client_id_); |
} |