Chromium Code Reviews| 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..293007829c32e1caf3ffa6a3bfc80907f9031130 100644 |
| --- a/cc/test/test_image_factory.cc |
| +++ b/cc/test/test_image_factory.cc |
| @@ -14,17 +14,24 @@ TestImageFactory::TestImageFactory() { |
| TestImageFactory::~TestImageFactory() { |
| } |
| -scoped_refptr<gfx::GLImage> TestImageFactory::CreateImageForGpuMemoryBuffer( |
| - const gfx::GpuMemoryBufferHandle& handle, |
| +scoped_refptr<gfx::GLImage> TestImageFactory::CreateImageForGpuMemoryBuffers( |
| + 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 |
|
reveman
2015/03/12 19:37:22
You can remove all this and just DCHECK_EQ(handles
emircan
2015/03/12 22:34:26
Done.
|
| + // 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; |