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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_shared_memory.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: ImageFactory::CreateImageForGpuMemoryBuffer interface changes. 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/gpu_memory_buffer_factory_shared_memory.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
index b10fd00dfbc98f756bbb68ba087dd49dc8d1f0fa..d4faed658c515c5318a98857161f1db82f2a89db 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_shared_memory.cc
@@ -70,14 +70,21 @@ gpu::ImageFactory* GpuMemoryBufferFactorySharedMemory::AsImageFactory() {
scoped_refptr<gfx::GLImage>
GpuMemoryBufferFactorySharedMemory::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,
unsigned internalformat,
int client_id) {
+ // TODO(emircan): See http://crbug.com/439520; support passing multiple
+ // buffers when new multi-planar formats are added.
+ if ((handles.size() != 1) || (formats.size() != 1)) {
+ NOTIMPLEMENTED();
+ return scoped_refptr<gfx::GLImageSharedMemory>();
+ }
+
scoped_refptr<gfx::GLImageSharedMemory> image(
new gfx::GLImageSharedMemory(size, internalformat));
- if (!image->Initialize(handle, format))
+ if (!image->Initialize(handles[0], formats[0]))
return scoped_refptr<gfx::GLImage>();
return image;

Powered by Google App Engine
This is Rietveld 408576698