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

Unified Diff: gpu/command_buffer/common/command_buffer.h

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/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);
};

Powered by Google App Engine
This is Rietveld 408576698