| 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 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 Cmd* recordDiscard(GrInOrderDrawBuffer*, GrRenderTarget*); | 76 Cmd* recordDiscard(GrInOrderDrawBuffer*, GrRenderTarget*); |
| 77 | 77 |
| 78 Cmd* recordDraw(GrInOrderDrawBuffer*, | 78 Cmd* recordDraw(GrInOrderDrawBuffer*, |
| 79 const GrGeometryProcessor*, | 79 const GrGeometryProcessor*, |
| 80 const GrDrawTarget::DrawInfo&, | 80 const GrDrawTarget::DrawInfo&, |
| 81 const GrDrawTarget::PipelineInfo&); | 81 const GrDrawTarget::PipelineInfo&); |
| 82 Cmd* recordDrawBatch(GrInOrderDrawBuffer*, | 82 Cmd* recordDrawBatch(GrInOrderDrawBuffer*, |
| 83 GrBatch*, | 83 GrBatch*, |
| 84 const GrDrawTarget::PipelineInfo&); | 84 const GrDrawTarget::PipelineInfo&); |
| 85 void recordDrawRect(GrInOrderDrawBuffer*, | |
| 86 GrPipelineBuilder*, | |
| 87 GrColor, | |
| 88 const SkMatrix& viewMatrix, | |
| 89 const SkRect& rect, | |
| 90 const SkRect* localRect, | |
| 91 const SkMatrix* localMatrix); | |
| 92 Cmd* recordStencilPath(GrInOrderDrawBuffer*, | 85 Cmd* recordStencilPath(GrInOrderDrawBuffer*, |
| 93 const GrPipelineBuilder&, | 86 const GrPipelineBuilder&, |
| 94 const GrPathProcessor*, | 87 const GrPathProcessor*, |
| 95 const GrPath*, | 88 const GrPath*, |
| 96 const GrScissorState&, | 89 const GrScissorState&, |
| 97 const GrStencilSettings&); | 90 const GrStencilSettings&); |
| 98 Cmd* recordDrawPath(GrInOrderDrawBuffer*, | 91 Cmd* recordDrawPath(GrInOrderDrawBuffer*, |
| 99 const GrPathProcessor*, | 92 const GrPathProcessor*, |
| 100 const GrPath*, | 93 const GrPath*, |
| 101 const GrStencilSettings&, | 94 const GrStencilSettings&, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 113 Cmd* recordClear(GrInOrderDrawBuffer*, | 106 Cmd* recordClear(GrInOrderDrawBuffer*, |
| 114 const SkIRect* rect, | 107 const SkIRect* rect, |
| 115 GrColor, | 108 GrColor, |
| 116 bool canIgnoreRect, | 109 bool canIgnoreRect, |
| 117 GrRenderTarget*); | 110 GrRenderTarget*); |
| 118 Cmd* recordCopySurface(GrSurface* dst, | 111 Cmd* recordCopySurface(GrSurface* dst, |
| 119 GrSurface* src, | 112 GrSurface* src, |
| 120 const SkIRect& srcRect, | 113 const SkIRect& srcRect, |
| 121 const SkIPoint& dstPoint); | 114 const SkIPoint& dstPoint); |
| 122 | 115 |
| 123 protected: | |
| 124 void willReserveVertexAndIndexSpace(int vertexCount, | |
| 125 size_t vertexStride, | |
| 126 int indexCount); | |
| 127 | |
| 128 private: | 116 private: |
| 129 friend class GrInOrderDrawBuffer; | 117 friend class GrInOrderDrawBuffer; |
| 130 | 118 |
| 131 typedef GrGpu::DrawArgs DrawArgs; | 119 typedef GrGpu::DrawArgs DrawArgs; |
| 132 | 120 |
| 133 // Attempts to concat instances from info onto the previous draw. info must
represent an | 121 // Attempts to concat instances from info onto the previous draw. info must
represent an |
| 134 // instanced draw. The caller must have already recorded a new draw state an
d clip if necessary. | 122 // instanced draw. The caller must have already recorded a new draw state an
d clip if necessary. |
| 135 int concatInstancedDraw(GrInOrderDrawBuffer*, const GrDrawTarget::DrawInfo&)
; | 123 int concatInstancedDraw(GrInOrderDrawBuffer*, const GrDrawTarget::DrawInfo&)
; |
| 136 | 124 |
| 137 bool SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(GrInOrderDrawBuffer*, | 125 bool SK_WARN_UNUSED_RESULT setupPipelineAndShouldDraw(GrInOrderDrawBuffer*, |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 typedef void* TCmdAlign; // This wouldn't be enough align if a command used
long double. | 294 typedef void* TCmdAlign; // This wouldn't be enough align if a command used
long double. |
| 307 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; | 295 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; |
| 308 | 296 |
| 309 CmdBuffer fCmdBuffer; | 297 CmdBuffer fCmdBuffer; |
| 310 SetState* fPrevState; | 298 SetState* fPrevState; |
| 311 GrBatchTarget fBatchTarget; | 299 GrBatchTarget fBatchTarget; |
| 312 }; | 300 }; |
| 313 | 301 |
| 314 #endif | 302 #endif |
| 315 | 303 |
| OLD | NEW |