OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrTargetCommands_DEFINED | 8 #ifndef GrTargetCommands_DEFINED |
9 #define GrTargetCommands_DEFINED | 9 #define GrTargetCommands_DEFINED |
10 | 10 |
11 #include "GrBatch.h" | 11 #include "GrBatch.h" |
12 #include "GrBatchTarget.h" | 12 #include "GrBatchTarget.h" |
13 #include "GrDrawTarget.h" | 13 #include "GrDrawTarget.h" |
14 #include "GrGpu.h" | 14 #include "GrGpu.h" |
15 #include "GrPath.h" | 15 #include "GrPath.h" |
16 #include "GrPendingProgramElement.h" | 16 #include "GrPendingProgramElement.h" |
17 #include "GrRenderTarget.h" | 17 #include "GrRenderTarget.h" |
18 #include "GrTRecorder.h" | 18 #include "GrTRecorder.h" |
19 #include "SkRect.h" | 19 #include "SkRect.h" |
20 #include "SkTypes.h" | 20 #include "SkTypes.h" |
21 | 21 |
22 class GrInOrderDrawBuffer; | 22 class GrInOrderDrawBuffer; |
23 class GrVertexBufferAllocPool; | 23 |
24 class GrIndexBufferAllocPool; | |
25 | 24 |
26 class GrTargetCommands : ::SkNoncopyable { | 25 class GrTargetCommands : ::SkNoncopyable { |
27 public: | 26 public: |
28 GrTargetCommands(GrGpu* gpu, | 27 GrTargetCommands(GrGpu* gpu) |
29 GrVertexBufferAllocPool* vertexPool, | |
30 GrIndexBufferAllocPool* indexPool) | |
31 : fCmdBuffer(kCmdBufferInitialSizeInBytes) | 28 : fCmdBuffer(kCmdBufferInitialSizeInBytes) |
32 , fBatchTarget(gpu, vertexPool, indexPool) { | 29 , fBatchTarget(gpu) { |
33 } | 30 } |
34 | 31 |
35 class Cmd : ::SkNoncopyable { | 32 class Cmd : ::SkNoncopyable { |
36 public: | 33 public: |
37 enum CmdType { | 34 enum CmdType { |
38 kStencilPath_CmdType = 1, | 35 kStencilPath_CmdType = 1, |
39 kSetState_CmdType = 2, | 36 kSetState_CmdType = 2, |
40 kClear_CmdType = 3, | 37 kClear_CmdType = 3, |
41 kCopySurface_CmdType = 4, | 38 kCopySurface_CmdType = 4, |
42 kDrawPath_CmdType = 5, | 39 kDrawPath_CmdType = 5, |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 255 |
259 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } | 256 CmdBuffer* cmdBuffer() { return &fCmdBuffer; } |
260 GrBatchTarget* batchTarget() { return &fBatchTarget; } | 257 GrBatchTarget* batchTarget() { return &fBatchTarget; } |
261 | 258 |
262 CmdBuffer fCmdBuffer; | 259 CmdBuffer fCmdBuffer; |
263 GrBatchTarget fBatchTarget; | 260 GrBatchTarget fBatchTarget; |
264 }; | 261 }; |
265 | 262 |
266 #endif | 263 #endif |
267 | 264 |
OLD | NEW |