Chromium Code Reviews| Index: content/common/gpu/gpu_command_buffer_stub.cc |
| diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc |
| index c108a999454b15af174e6adb857fc7c1e2fe48e5..7c8f5c910a6d8b3cf1bea0af7b1196f733ee2ff6 100644 |
| --- a/content/common/gpu/gpu_command_buffer_stub.cc |
| +++ b/content/common/gpu/gpu_command_buffer_stub.cc |
| @@ -962,11 +962,12 @@ void GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback( |
| } |
| } |
| -void GpuCommandBufferStub::OnCreateImage(int32 id, |
| - gfx::GpuMemoryBufferHandle handle, |
| - gfx::Size size, |
| - gfx::GpuMemoryBuffer::Format format, |
| - uint32 internalformat) { |
| +void GpuCommandBufferStub::OnCreateImage( |
| + int32 id, |
| + std::vector<gfx::GpuMemoryBufferHandle> handles, |
| + gfx::Size size, |
| + std::vector<gfx::GpuMemoryBuffer::Format> formats, |
| + uint32 internalformat) { |
| TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateImage"); |
| if (!decoder_) |
| @@ -979,13 +980,17 @@ void GpuCommandBufferStub::OnCreateImage(int32 id, |
| return; |
| } |
| - if (!IsSupportedImageFormat(decoder_->GetCapabilities(), format)) { |
| - LOG(ERROR) << "Image format is not supported."; |
| - return; |
| + int num_buffers = handles.size(); |
| + |
| + for (int i = 0; i < num_buffers; ++i) { |
|
reveman
2015/03/05 19:35:32
for (auto format : formats) instead?
emircan
2015/03/09 21:07:22
I could have. But, now gpu::ImageFactory::IsImageF
|
| + if (!IsSupportedImageFormat(decoder_->GetCapabilities(), formats[i])) { |
|
reveman
2015/03/05 19:35:32
You have to be careful here. What if size of forma
emircan
2015/03/09 21:07:22
I see, it is possible to give those input through
|
| + LOG(ERROR) << "Image format is not supported."; |
| + return; |
| + } |
| } |
| scoped_refptr<gfx::GLImage> image = channel()->CreateImageForGpuMemoryBuffer( |
| - handle, size, format, internalformat); |
| + handles, size, formats, internalformat); |
| if (!image.get()) |
| return; |