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

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: 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: 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 40dd15a0e611212b5f50f1e71821598b3e47199d..f338b3b95f2c23141960b03e199f3dffe20a6071 100644
--- a/gpu/command_buffer/service/image_factory.h
+++ b/gpu/command_buffer/service/image_factory.h
@@ -20,10 +20,15 @@ class GPU_EXPORT ImageFactory {
public:
ImageFactory();
- // Returns a valid GpuMemoryBuffer format given a valid internalformat as
- // defined by CHROMIUM_gpu_memory_buffer_image.
- static gfx::GpuMemoryBuffer::Format ImageFormatToGpuMemoryBufferFormat(
- unsigned internalformat);
+ // Returns the number of GpuMemoryBuffers used when given a valid
+ // |internalformat| as defined by CHROMIUM_gpu_memory_buffer_image.
+ static int GpuMemoryBufferCountForImageFormat(unsigned internalformat);
+
+ // Fills a vector of valid GpuMemoryBuffer formats in |formats| when given a
+ // valid |internalformat| as defined by CHROMIUM_gpu_memory_buffer_image.
+ static void ImageFormatToGpuMemoryBufferFormats(
+ unsigned internalformat,
+ std::vector<gfx::GpuMemoryBuffer::Format>* formats);
// Returns a valid GpuMemoryBuffer usage given a valid usage as defined by
// CHROMIUM_gpu_memory_buffer_image.
@@ -39,9 +44,9 @@ class GPU_EXPORT ImageFactory {
// |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(
reveman 2015/03/05 19:35:32 CreateImageForGpuMemoryBuffers
emircan 2015/03/09 21:07:23 Done. Sorry for missing that.
- 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) = 0;

Powered by Google App Engine
This is Rietveld 408576698