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

Unified Diff: gpu/command_buffer/service/image_factory.h

Issue 962723002: Change CHROMIUM_image declarations to support multi planar input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trybot issues fixed. Created 5 years, 9 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: 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;

Powered by Google App Engine
This is Rietveld 408576698