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

Unified Diff: src/gpu/GrGpuCommandBuffer.h

Issue 2038583002: Add GpuCommandBuffer support. (Closed) Base URL: https://skia.googlesource.com/skia.git@secondaryCB
Patch Set: Created 4 years, 6 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
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuCommandBuffer.h
diff --git a/src/gpu/GrGpuCommandBuffer.h b/src/gpu/GrGpuCommandBuffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..3c6e6116fb6a17f61bd0fb23ac0b270de0baa0c9
--- /dev/null
+++ b/src/gpu/GrGpuCommandBuffer.h
@@ -0,0 +1,37 @@
+/*
+* Copyright 2016 Google Inc.
+*
+* Use of this source code is governed by a BSD-style license that can be
+* found in the LICENSE file.
+*/
+
+#ifndef GrGpuCommandBuffer_DEFINED
+#define GrGpuCommandBuffer_DEFINED
+
+#include "GrColor.h"
+
+class GrRenderTarget;
+
+class GrGpuCommandBuffer {
+public:
+ enum LoadAndStoreOp {
+ kLoadAndStore_LoadAndStoreOp,
+ kLoadAndDiscard_LoadAndStoreOp,
+ kClearAndStore_LoadAndStoreOp,
+ kClearAndDiscard_LoadAndStoreOp,
+ kDiscardAndStore_LoadAndStoreOp,
+ kDiscardAndDiscard_LoadAndStoreOp,
+ };
+
+ GrGpuCommandBuffer() {}
+ virtual ~GrGpuCommandBuffer() {}
+
+ // Signals the end of recording to the command buffer and that it can now be submitted.
+ virtual void end() = 0;
+
+ // Sends the command buffer off to the GPU object to execute the commands built up in the
+ // buffer. The gpu object is allowed to defer execution of the commands until it is flushed.
+ virtual void submit() = 0;
+};
+
+#endif
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698