| Index: content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| diff --git a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| index 6185150e5cf71764ea4ffcef46548084ae8253e3..b8573c33f1f8d0445681b74f20c5854b48d52705 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
|
| @@ -79,15 +79,24 @@ gpu::ImageFactory* GpuMemoryBufferFactoryOzoneNativeBuffer::AsImageFactory() {
|
| }
|
|
|
| scoped_refptr<gfx::GLImage>
|
| -GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForGpuMemoryBuffer(
|
| - const gfx::GpuMemoryBufferHandle& handle,
|
| +GpuMemoryBufferFactoryOzoneNativeBuffer::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) {
|
| - DCHECK_EQ(handle.type, gfx::OZONE_NATIVE_BUFFER);
|
| - return ozone_native_buffer_factory_.CreateImageForGpuMemoryBuffer(
|
| - handle.id, size, format, internalformat, client_id);
|
| + int num_buffers =
|
| + gpu::ImageFactory::GpuMemoryBufferCountForImageFormat(internalformat);
|
| +
|
| + std::vector<gfx::GpuMemoryBufferId> handle_ids;
|
| + handle_ids.reserve(num_buffers);
|
| + for(const auto& handle : handles) {
|
| + DCHECK_EQ(handle.type, gfx::OZONE_NATIVE_BUFFER);
|
| + handle_ids.push_back(handle.id);
|
| + }
|
| +
|
| + return ozone_native_buffer_factory_.CreateImageForGpuMemoryBuffers(
|
| + num_buffers, handle_ids, size, formats, internalformat, client_id);
|
| }
|
|
|
| } // namespace content
|
|
|