| 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 11 matching lines...) Expand all Loading... |
| 22 static GrCommandBuilder* Create(GrGpu* gpu, bool reorder); | 22 static GrCommandBuilder* Create(GrGpu* gpu, bool reorder); |
| 23 | 23 |
| 24 virtual ~GrCommandBuilder() {} | 24 virtual ~GrCommandBuilder() {} |
| 25 | 25 |
| 26 void reset() { fCommands.reset(); } | 26 void reset() { fCommands.reset(); } |
| 27 void flush(GrGpu* gpu, GrResourceProvider* rp) { fCommands.flush(gpu, rp); } | 27 void flush(GrGpu* gpu, GrResourceProvider* rp) { fCommands.flush(gpu, rp); } |
| 28 | 28 |
| 29 virtual Cmd* recordClearStencilClip(const SkIRect& rect, | 29 virtual Cmd* recordClearStencilClip(const SkIRect& rect, |
| 30 bool insideClip, | 30 bool insideClip, |
| 31 GrRenderTarget* renderTarget); | 31 GrRenderTarget* renderTarget); |
| 32 virtual Cmd* recordDiscard(GrRenderTarget*); | 32 virtual Cmd* recordDrawBatch(GrBatch*, const GrCaps&) = 0; |
| 33 virtual Cmd* recordDrawBatch(GrDrawBatch*, const GrCaps&) = 0; | |
| 34 virtual Cmd* recordStencilPath(const GrPipelineBuilder&, | 33 virtual Cmd* recordStencilPath(const GrPipelineBuilder&, |
| 35 const GrPathProcessor*, | 34 const GrPathProcessor*, |
| 36 const GrPath*, | 35 const GrPath*, |
| 37 const GrScissorState&, | 36 const GrScissorState&, |
| 38 const GrStencilSettings&) = 0; | 37 const GrStencilSettings&) = 0; |
| 39 virtual Cmd* recordDrawPath(State*, | 38 virtual Cmd* recordDrawPath(State*, |
| 40 const GrPathProcessor*, | 39 const GrPathProcessor*, |
| 41 const GrPath*, | 40 const GrPath*, |
| 42 const GrStencilSettings&) = 0; | 41 const GrStencilSettings&) = 0; |
| 43 virtual Cmd* recordDrawPaths(State*, | 42 virtual Cmd* recordDrawPaths(State*, |
| 44 GrBufferedDrawTarget*, | 43 GrBufferedDrawTarget*, |
| 45 const GrPathProcessor*, | 44 const GrPathProcessor*, |
| 46 const GrPathRange*, | 45 const GrPathRange*, |
| 47 const void*, | 46 const void*, |
| 48 GrDrawTarget::PathIndexType, | 47 GrDrawTarget::PathIndexType, |
| 49 const float transformValues[], | 48 const float transformValues[], |
| 50 GrDrawTarget::PathTransformType , | 49 GrDrawTarget::PathTransformType , |
| 51 int, | 50 int, |
| 52 const GrStencilSettings&, | 51 const GrStencilSettings&, |
| 53 const GrPipelineOptimizations&) = 0; | 52 const GrPipelineOptimizations&) = 0; |
| 54 virtual Cmd* recordClear(const SkIRect& rect, | |
| 55 GrColor, | |
| 56 GrRenderTarget*); | |
| 57 virtual Cmd* recordCopySurface(GrSurface* dst, | 53 virtual Cmd* recordCopySurface(GrSurface* dst, |
| 58 GrSurface* src, | 54 GrSurface* src, |
| 59 const SkIRect& srcRect, | 55 const SkIRect& srcRect, |
| 60 const SkIPoint& dstPoint); | 56 const SkIPoint& dstPoint); |
| 61 | 57 |
| 62 protected: | 58 protected: |
| 63 typedef GrTargetCommands::DrawBatch DrawBatch; | 59 typedef GrTargetCommands::DrawBatch DrawBatch; |
| 64 typedef GrTargetCommands::StencilPath StencilPath; | 60 typedef GrTargetCommands::StencilPath StencilPath; |
| 65 typedef GrTargetCommands::DrawPath DrawPath; | 61 typedef GrTargetCommands::DrawPath DrawPath; |
| 66 typedef GrTargetCommands::DrawPaths DrawPaths; | 62 typedef GrTargetCommands::DrawPaths DrawPaths; |
| 67 typedef GrTargetCommands::Clear Clear; | |
| 68 typedef GrTargetCommands::ClearStencilClip ClearStencilClip; | 63 typedef GrTargetCommands::ClearStencilClip ClearStencilClip; |
| 69 typedef GrTargetCommands::CopySurface CopySurface; | 64 typedef GrTargetCommands::CopySurface CopySurface; |
| 70 | 65 |
| 71 GrCommandBuilder() {} | 66 GrCommandBuilder() {} |
| 72 | 67 |
| 73 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } | 68 GrTargetCommands::CmdBuffer* cmdBuffer() { return fCommands.cmdBuffer(); } |
| 74 private: | 69 private: |
| 75 GrTargetCommands fCommands; | 70 GrTargetCommands fCommands; |
| 76 | 71 |
| 77 }; | 72 }; |
| 78 | 73 |
| 79 #endif | 74 #endif |
| OLD | NEW |