Chromium Code Reviews| Index: content/common/gpu/client/command_buffer_proxy_impl.cc |
| diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc |
| index 75cffa2fdd0f5340391b23bbd493ab4b7bae6b19..7110d451e7bb23541ccde43c7c0ba80512ca2ca1 100644 |
| --- a/content/common/gpu/client/command_buffer_proxy_impl.cc |
| +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc |
| @@ -347,7 +347,7 @@ gpu::Capabilities CommandBufferProxyImpl::GetCapabilities() { |
| return capabilities_; |
| } |
| -int32_t CommandBufferProxyImpl::CreateImage(ClientBuffer buffer, |
| +int32_t CommandBufferProxyImpl::CreateImage(const ClientBuffer* const buffers, |
| size_t width, |
| size_t height, |
| unsigned internalformat) { |
| @@ -359,8 +359,10 @@ int32_t CommandBufferProxyImpl::CreateImage(ClientBuffer buffer, |
| gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager = |
| channel_->gpu_memory_buffer_manager(); |
| + // TODO(emircan): See http://crbug.com/439520; support passing multiple |
| + // buffers when new multi-planar formats are added. |
| gfx::GpuMemoryBuffer* gpu_memory_buffer = |
|
reveman
2015/03/03 05:30:13
Please don't stop here. Go as far as you need to f
emircan
2015/03/04 03:03:16
Sure, I was just trying to keep CL smaller.
I add
|
| - gpu_memory_buffer_manager->GpuMemoryBufferFromClientBuffer(buffer); |
| + gpu_memory_buffer_manager->GpuMemoryBufferFromClientBuffer(buffers[0]); |
| DCHECK(gpu_memory_buffer); |
| // This handle is owned by the GPU process and must be passed to it or it |
| @@ -412,7 +414,9 @@ int32_t CommandBufferProxyImpl::CreateGpuMemoryBufferImage( |
| if (!buffer) |
| return -1; |
| - return CreateImage(buffer->AsClientBuffer(), width, height, internalformat); |
| + const ClientBuffer& client_buffer = buffer->AsClientBuffer(); |
| + return CreateImage(const_cast<const ClientBuffer* const>(&client_buffer), |
| + width, height, internalformat); |
| } |
| int CommandBufferProxyImpl::GetRouteID() const { |