| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrInOrderDrawBuffer_DEFINED | 8 #ifndef GrInOrderDrawBuffer_DEFINED |
| 9 #define GrInOrderDrawBuffer_DEFINED | 9 #define GrInOrderDrawBuffer_DEFINED |
| 10 | 10 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc; | 178 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 struct SetState : public Cmd { | 181 struct SetState : public Cmd { |
| 182 SetState(const GrDrawState& drawState, const GrPrimitiveProcessor* primP
roc, | 182 SetState(const GrDrawState& drawState, const GrPrimitiveProcessor* primP
roc, |
| 183 const GrDrawTargetCaps& caps, | 183 const GrDrawTargetCaps& caps, |
| 184 const GrScissorState& scissor, const GrDeviceCoordTexture* dstC
opy, | 184 const GrScissorState& scissor, const GrDeviceCoordTexture* dstC
opy, |
| 185 GrGpu::DrawType drawType) | 185 GrGpu::DrawType drawType) |
| 186 : Cmd(kSetState_Cmd) | 186 : Cmd(kSetState_Cmd) |
| 187 , fPrimitiveProcessor(primProc) | 187 , fPrimitiveProcessor(primProc) |
| 188 , fState(drawState, primProc, caps, scissor, dstCopy, drawType) {} | 188 , fState(drawState, primProc, caps, scissor, dstCopy) |
| 189 , fDrawType(drawType) {} |
| 189 | 190 |
| 190 void execute(GrInOrderDrawBuffer*, const SetState*) SK_OVERRIDE; | 191 void execute(GrInOrderDrawBuffer*, const SetState*) SK_OVERRIDE; |
| 191 | 192 |
| 192 typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimi
tiveProcessor; | 193 typedef GrPendingProgramElement<const GrPrimitiveProcessor> ProgramPrimi
tiveProcessor; |
| 193 ProgramPrimitiveProcessor fPrimitiveProcessor; | 194 ProgramPrimitiveProcessor fPrimitiveProcessor; |
| 194 const GrOptDrawState fState; | 195 const GrOptDrawState fState; |
| 195 GrProgramDesc fDesc; | 196 GrProgramDesc fDesc; |
| 196 GrBatchTracker fBatchTracker; | 197 GrBatchTracker fBatchTracker; |
| 198 GrGpu::DrawType fDrawType; |
| 197 }; | 199 }; |
| 198 | 200 |
| 199 typedef void* TCmdAlign; // This wouldn't be enough align if a command used
long double. | 201 typedef void* TCmdAlign; // This wouldn't be enough align if a command used
long double. |
| 200 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; | 202 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; |
| 201 | 203 |
| 202 void onReset() SK_OVERRIDE; | 204 void onReset() SK_OVERRIDE; |
| 203 void onFlush() SK_OVERRIDE; | 205 void onFlush() SK_OVERRIDE; |
| 204 | 206 |
| 205 // overrides from GrDrawTarget | 207 // overrides from GrDrawTarget |
| 206 void onDraw(const GrDrawState&, | 208 void onDraw(const GrDrawState&, |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 SetState* fPrevState; | 278 SetState* fPrevState; |
| 277 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; | 279 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; |
| 278 SkTDArray<char> fPathIndexBuffer; | 280 SkTDArray<char> fPathIndexBuffer; |
| 279 SkTDArray<float> fPathTransformBuffer; | 281 SkTDArray<float> fPathTransformBuffer; |
| 280 uint32_t fDrawID; | 282 uint32_t fDrawID; |
| 281 | 283 |
| 282 typedef GrFlushToGpuDrawTarget INHERITED; | 284 typedef GrFlushToGpuDrawTarget INHERITED; |
| 283 }; | 285 }; |
| 284 | 286 |
| 285 #endif | 287 #endif |
| OLD | NEW |