Index: gpu/command_buffer/common/command_buffer.h |
diff --git a/gpu/command_buffer/common/command_buffer.h b/gpu/command_buffer/common/command_buffer.h |
index 3078bca2ba3af97db63fbdd5ecb9da0180d94cbd..ab50ea05947df5832a9e3a03074867ab716b83fe 100644 |
--- a/gpu/command_buffer/common/command_buffer.h |
+++ b/gpu/command_buffer/common/command_buffer.h |
@@ -13,6 +13,10 @@ namespace base { |
class SharedMemory; |
} |
+namespace gfx { |
+class GpuMemoryBuffer; |
+} |
+ |
namespace gpu { |
// Common interface for CommandBuffer implementations. |
@@ -141,6 +145,17 @@ class GPU_EXPORT CommandBuffer { |
// be used for cross-context synchronization. |
virtual uint32 InsertSyncPoint() = 0; |
+ // Create a gpu memory buffer of the given dimensions and format. Returns |
+ // its ID or -1 on error. |
+ virtual gfx::GpuMemoryBuffer* CreateGpuMemoryBuffer( |
+ size_t width, |
+ size_t height, |
+ unsigned internalformat, |
+ int32* id) = 0; |
+ |
+ // Destroy a gpu memory buffer. The ID must be positive. |
+ virtual void DestroyGpuMemoryBuffer(int32 id) = 0; |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(CommandBuffer); |
}; |