Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: content/common/gpu/client/command_buffer_proxy_impl.cc

Issue 962723002: Change CHROMIUM_image declarations to support multi planar input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reveman@ comments and const-corrected function signatures. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698