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

Unified Diff: content/common/gpu/gpu_channel.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_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index c12c762c6004f725973182513535274cc6ac2cc7..013356c148e8a04efc455ed27f9e259ddd70a21a 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -828,10 +828,20 @@ uint64 GpuChannel::GetMemoryUsage() {
}
scoped_refptr<gfx::GLImage> GpuChannel::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,
uint32 internalformat) {
+ // TODO(emircan): See http://crbug.com/439520; support passing multiple
reveman 2015/03/05 19:35:32 Sorry if I didn't make this clear but I don't want
emircan 2015/03/09 21:07:22 Ok, going all the way :) I got some advice to keep
+ // buffers when new multi-planar formats are added.
+ if ((handles.size() != 1) || (formats.size() != 1)) {
+ NOTIMPLEMENTED();
+ return scoped_refptr<gfx::GLImage>();
+ }
+
+ const gfx::GpuMemoryBufferHandle& handle = handles[0];
+ const gfx::GpuMemoryBuffer::Format& format = formats[0];
+
switch (handle.type) {
case gfx::SHARED_MEMORY_BUFFER: {
scoped_refptr<gfx::GLImageSharedMemory> image(
@@ -848,9 +858,9 @@ scoped_refptr<gfx::GLImage> GpuChannel::CreateImageForGpuMemoryBuffer(
return manager->gpu_memory_buffer_factory()
->AsImageFactory()
- ->CreateImageForGpuMemoryBuffer(handle,
+ ->CreateImageForGpuMemoryBuffer(handles,
size,
- format,
+ formats,
internalformat,
client_id_);
}

Powered by Google App Engine
This is Rietveld 408576698