Chromium Code Reviews| Index: gpu/command_buffer/service/image_factory.h |
| diff --git a/gpu/command_buffer/service/image_factory.h b/gpu/command_buffer/service/image_factory.h |
| index b5813421945636813d2e72aecb775420bfa9953e..327861fee6a0a966928df272eb8f1b790b959596 100644 |
| --- a/gpu/command_buffer/service/image_factory.h |
| +++ b/gpu/command_buffer/service/image_factory.h |
| @@ -21,10 +21,17 @@ class GPU_EXPORT ImageFactory { |
| public: |
| ImageFactory(); |
| - // Returns a valid GpuMemoryBuffer format given a valid internalformat as |
| - // defined by CHROMIUM_gpu_memory_buffer_image. |
| + // Returns the number of GpuMemoryBuffers used when given a valid |
| + // |internalformat| as defined by CHROMIUM_gpu_memory_buffer_image. |
| + static int GpuMemoryBufferCountForImageFormat(unsigned internalformat); |
|
reveman
2015/03/12 19:37:23
size_t as return type? And how about renaming this
emircan
2015/03/12 22:34:26
Done.
|
| + |
| + // Returns a valid GpuMemoryBuffer format given a valid |internalformat| as |
| + // defined by CHROMIUM_gpu_memory_buffer_image, and |buffer_index| |
| + // representing the zero-based index of the buffer in a multiple planar |
| + // format. |
| static gfx::GpuMemoryBuffer::Format ImageFormatToGpuMemoryBufferFormat( |
| - unsigned internalformat); |
| + unsigned internalformat, |
| + int buffer_index); |
|
reveman
2015/03/12 19:37:23
"size_t plane"?
emircan
2015/03/12 22:34:26
Done.
|
| // Returns a valid GpuMemoryBuffer usage given a valid usage as defined by |
| // CHROMIUM_gpu_memory_buffer_image. |
| @@ -34,6 +41,7 @@ class GPU_EXPORT ImageFactory { |
| // Returns true if |internalformat| is compatible with |format|. |
| static bool IsImageFormatCompatibleWithGpuMemoryBufferFormat( |
| unsigned internalformat, |
| + int buffer_index, |
|
reveman
2015/03/12 19:37:23
size_t plane
emircan
2015/03/12 22:34:26
Done.
|
| gfx::GpuMemoryBuffer::Format format); |
| // Returns true if |format| is supported by |capabilities|. |
| @@ -49,10 +57,10 @@ class GPU_EXPORT ImageFactory { |
| // Creates a GLImage instance for GPU memory buffer identified by |handle|. |
| // |client_id| should be set to the client requesting the creation of instance |
| // and can be used by factory implementation to verify access rights. |
| - virtual scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer( |
| - const gfx::GpuMemoryBufferHandle& handle, |
| + virtual scoped_refptr<gfx::GLImage> 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) = 0; |