| 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 GrCommandBuilder_DEFINED | 8 #ifndef GrCommandBuilder_DEFINED | 
| 9 #define GrCommandBuilder_DEFINED | 9 #define GrCommandBuilder_DEFINED | 
| 10 | 10 | 
| 11 #include "GrTargetCommands.h" | 11 #include "GrTargetCommands.h" | 
| 12 | 12 | 
| 13 class GrInOrderDrawBuffer; | 13 class GrInOrderDrawBuffer; | 
| 14 class GrVertexBufferAllocPool; |  | 
| 15 class GrIndexBufferAllocPool; |  | 
| 16 | 14 | 
| 17 class GrCommandBuilder : ::SkNoncopyable { | 15 class GrCommandBuilder : ::SkNoncopyable { | 
| 18 public: | 16 public: | 
| 19     typedef GrTargetCommands::Cmd Cmd; | 17     typedef GrTargetCommands::Cmd Cmd; | 
| 20     typedef GrTargetCommands::State State; | 18     typedef GrTargetCommands::State State; | 
| 21 | 19 | 
| 22     GrCommandBuilder(GrGpu* gpu, | 20     GrCommandBuilder(GrGpu* gpu) : fCommands(gpu) { } | 
| 23                      GrVertexBufferAllocPool* vertexPool, |  | 
| 24                      GrIndexBufferAllocPool* indexPool) |  | 
| 25         : fCommands(gpu, vertexPool, indexPool) { |  | 
| 26     } |  | 
| 27 | 21 | 
| 28     virtual ~GrCommandBuilder() {} | 22     virtual ~GrCommandBuilder() {} | 
| 29 | 23 | 
| 30     void reset() { fCommands.reset(); } | 24     void reset() { fCommands.reset(); } | 
| 31     void flush(GrInOrderDrawBuffer* iodb) { fCommands.flush(iodb); } | 25     void flush(GrInOrderDrawBuffer* iodb) { fCommands.flush(iodb); } | 
| 32 | 26 | 
| 33     virtual Cmd* recordClearStencilClip(const SkIRect& rect, | 27     virtual Cmd* recordClearStencilClip(const SkIRect& rect, | 
| 34                                         bool insideClip, | 28                                         bool insideClip, | 
| 35                                         GrRenderTarget* renderTarget); | 29                                         GrRenderTarget* renderTarget); | 
| 36     virtual Cmd* recordDiscard(GrRenderTarget*); | 30     virtual Cmd* recordDiscard(GrRenderTarget*); | 
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 77 | 71 | 
| 78     GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } | 72     GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } | 
| 79     GrBatchTarget* batchTarget() { return fCommands.batchTarget(); } | 73     GrBatchTarget* batchTarget() { return fCommands.batchTarget(); } | 
| 80 | 74 | 
| 81 private: | 75 private: | 
| 82     GrTargetCommands fCommands; | 76     GrTargetCommands fCommands; | 
| 83 | 77 | 
| 84 }; | 78 }; | 
| 85 | 79 | 
| 86 #endif | 80 #endif | 
| OLD | NEW | 
|---|