| 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 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 virtual ~GrCommandBuilder() {} | 28 virtual ~GrCommandBuilder() {} |
| 29 | 29 |
| 30 void reset() { fCommands.reset(); } | 30 void reset() { fCommands.reset(); } |
| 31 void flush(GrInOrderDrawBuffer* iodb) { fCommands.flush(iodb); } | 31 void flush(GrInOrderDrawBuffer* iodb) { fCommands.flush(iodb); } |
| 32 | 32 |
| 33 virtual Cmd* recordClearStencilClip(const SkIRect& rect, | 33 virtual Cmd* recordClearStencilClip(const SkIRect& rect, |
| 34 bool insideClip, | 34 bool insideClip, |
| 35 GrRenderTarget* renderTarget); | 35 GrRenderTarget* renderTarget); |
| 36 virtual Cmd* recordDiscard(GrRenderTarget*); | 36 virtual Cmd* recordDiscard(GrRenderTarget*); |
| 37 virtual Cmd* recordDrawBatch(State*, GrBatch*); | 37 virtual Cmd* recordDrawBatch(State*, GrBatch*) = 0; |
| 38 virtual Cmd* recordStencilPath(const GrPipelineBuilder&, | 38 virtual Cmd* recordStencilPath(const GrPipelineBuilder&, |
| 39 const GrPathProcessor*, | 39 const GrPathProcessor*, |
| 40 const GrPath*, | 40 const GrPath*, |
| 41 const GrScissorState&, | 41 const GrScissorState&, |
| 42 const GrStencilSettings&); | 42 const GrStencilSettings&) = 0; |
| 43 virtual Cmd* recordDrawPath(State*, | 43 virtual Cmd* recordDrawPath(State*, |
| 44 const GrPathProcessor*, | 44 const GrPathProcessor*, |
| 45 const GrPath*, | 45 const GrPath*, |
| 46 const GrStencilSettings&); | 46 const GrStencilSettings&) = 0; |
| 47 virtual Cmd* recordDrawPaths(State*, | 47 virtual Cmd* recordDrawPaths(State*, |
| 48 GrInOrderDrawBuffer*, | 48 GrInOrderDrawBuffer*, |
| 49 const GrPathProcessor*, | 49 const GrPathProcessor*, |
| 50 const GrPathRange*, | 50 const GrPathRange*, |
| 51 const void*, | 51 const void*, |
| 52 GrDrawTarget::PathIndexType, | 52 GrDrawTarget::PathIndexType, |
| 53 const float transformValues[], | 53 const float transformValues[], |
| 54 GrDrawTarget::PathTransformType , | 54 GrDrawTarget::PathTransformType , |
| 55 int, | 55 int, |
| 56 const GrStencilSettings&, | 56 const GrStencilSettings&, |
| 57 const GrDrawTarget::PipelineInfo&); | 57 const GrDrawTarget::PipelineInfo&) = 0; |
| 58 virtual Cmd* recordClear(const SkIRect* rect, | 58 virtual Cmd* recordClear(const SkIRect* rect, |
| 59 GrColor, | 59 GrColor, |
| 60 bool canIgnoreRect, | 60 bool canIgnoreRect, |
| 61 GrRenderTarget*); | 61 GrRenderTarget*); |
| 62 virtual Cmd* recordCopySurface(GrSurface* dst, | 62 virtual Cmd* recordCopySurface(GrSurface* dst, |
| 63 GrSurface* src, | 63 GrSurface* src, |
| 64 const SkIRect& srcRect, | 64 const SkIRect& srcRect, |
| 65 const SkIPoint& dstPoint); | 65 const SkIPoint& dstPoint); |
| 66 virtual Cmd* recordXferBarrierIfNecessary(const GrPipeline&, const GrDrawTar
getCaps&); | 66 virtual Cmd* recordXferBarrierIfNecessary(const GrPipeline&, const GrDrawTar
getCaps&); |
| 67 | 67 |
| 68 private: | 68 protected: |
| 69 typedef GrTargetCommands::DrawBatch DrawBatch; | 69 typedef GrTargetCommands::DrawBatch DrawBatch; |
| 70 typedef GrTargetCommands::StencilPath StencilPath; | 70 typedef GrTargetCommands::StencilPath StencilPath; |
| 71 typedef GrTargetCommands::DrawPath DrawPath; | 71 typedef GrTargetCommands::DrawPath DrawPath; |
| 72 typedef GrTargetCommands::DrawPaths DrawPaths; | 72 typedef GrTargetCommands::DrawPaths DrawPaths; |
| 73 typedef GrTargetCommands::Clear Clear; | 73 typedef GrTargetCommands::Clear Clear; |
| 74 typedef GrTargetCommands::ClearStencilClip ClearStencilClip; | 74 typedef GrTargetCommands::ClearStencilClip ClearStencilClip; |
| 75 typedef GrTargetCommands::CopySurface CopySurface; | 75 typedef GrTargetCommands::CopySurface CopySurface; |
| 76 typedef GrTargetCommands::XferBarrier XferBarrier; | 76 typedef GrTargetCommands::XferBarrier XferBarrier; |
| 77 | 77 |
| 78 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } | 78 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } |
| 79 GrBatchTarget* batchTarget() { return fCommands.batchTarget(); } | 79 GrBatchTarget* batchTarget() { return fCommands.batchTarget(); } |
| 80 | 80 |
| 81 private: |
| 81 GrTargetCommands fCommands; | 82 GrTargetCommands fCommands; |
| 82 | 83 |
| 83 }; | 84 }; |
| 84 | 85 |
| 85 #endif | 86 #endif |
| OLD | NEW |