OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef GrGpuCommandBuffer_DEFINED |
| 9 #define GrGpuCommandBuffer_DEFINED |
| 10 |
| 11 #include "GrColor.h" |
| 12 |
| 13 class GrRenderTarget; |
| 14 |
| 15 class GrGpuCommandBuffer { |
| 16 public: |
| 17 enum LoadAndStoreOp { |
| 18 kLoadAndStore_LoadAndStoreOp, |
| 19 kLoadAndDiscard_LoadAndStoreOp, |
| 20 kClearAndStore_LoadAndStoreOp, |
| 21 kClearAndDiscard_LoadAndStoreOp, |
| 22 kDiscardAndStore_LoadAndStoreOp, |
| 23 kDiscardAndDiscard_LoadAndStoreOp, |
| 24 }; |
| 25 |
| 26 GrGpuCommandBuffer() {} |
| 27 virtual ~GrGpuCommandBuffer() {} |
| 28 |
| 29 // Signals the end of recording to the command buffer and that it can now be
submitted. |
| 30 virtual void end() = 0; |
| 31 |
| 32 // Sends the command buffer off to the GPU object to execute the commands bu
ilt up in the |
| 33 // buffer. The gpu object is allowed to defer execution of the commands unti
l it is flushed. |
| 34 virtual void submit() = 0; |
| 35 }; |
| 36 |
| 37 #endif |
OLD | NEW |