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

Unified Diff: cc/test/test_image_factory.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: cc/test/test_image_factory.cc
diff --git a/cc/test/test_image_factory.cc b/cc/test/test_image_factory.cc
index 42e35026dabc71ecae92915f78ff59464f063696..ab094e747ff85207d693967825a4189d0b09dc1f 100644
--- a/cc/test/test_image_factory.cc
+++ b/cc/test/test_image_factory.cc
@@ -15,16 +15,23 @@ TestImageFactory::~TestImageFactory() {
}
scoped_refptr<gfx::GLImage> TestImageFactory::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) {
- DCHECK_EQ(handle.type, gfx::SHARED_MEMORY_BUFFER);
+ // 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>();
+ }
+
+ DCHECK_EQ(handles[0].type, gfx::SHARED_MEMORY_BUFFER);
scoped_refptr<gfx::GLImageSharedMemory> image(
new gfx::GLImageSharedMemory(size, internalformat));
- if (!image->Initialize(handle, format))
+ if (!image->Initialize(handles[0], formats[0]))
return nullptr;
return image;

Powered by Google App Engine
This is Rietveld 408576698