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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 SkIPoint fDstPoint; | 165 SkIPoint fDstPoint; |
166 SkIRect fSrcRect; | 166 SkIRect fSrcRect; |
167 | 167 |
168 private: | 168 private: |
169 GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst; | 169 GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst; |
170 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc; | 170 GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc; |
171 }; | 171 }; |
172 | 172 |
173 struct SetState : public Cmd { | 173 struct SetState : public Cmd { |
174 SetState(const GrDrawState& drawState, const GrDrawTargetCaps& caps, | 174 SetState(const GrDrawState& drawState, GrGpu* gpu, const ScissorState& s
cissor, |
175 const ScissorState& scissor, const GrDeviceCoordTexture* dstCop
y, | 175 const GrDeviceCoordTexture* dstCopy, GrGpu::DrawType drawType) |
176 GrGpu::DrawType drawType) | |
177 : Cmd(kSetState_Cmd) | 176 : Cmd(kSetState_Cmd) |
178 , fState(drawState, caps, scissor, dstCopy, drawType) {} | 177 , fState(drawState, gpu, scissor, dstCopy, drawType) {} |
179 | 178 |
180 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE; | 179 void execute(GrInOrderDrawBuffer*, const GrOptDrawState*) SK_OVERRIDE; |
181 | 180 |
182 GrOptDrawState fState; | 181 const GrOptDrawState fState; |
| 182 GrGpu::DrawType fDrawType; |
183 }; | 183 }; |
184 | 184 |
185 typedef void* TCmdAlign; // This wouldn't be enough align if a command used
long double. | 185 typedef void* TCmdAlign; // This wouldn't be enough align if a command used
long double. |
186 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; | 186 typedef GrTRecorder<Cmd, TCmdAlign> CmdBuffer; |
187 | 187 |
188 void onReset() SK_OVERRIDE; | 188 void onReset() SK_OVERRIDE; |
189 void onFlush() SK_OVERRIDE; | 189 void onFlush() SK_OVERRIDE; |
190 | 190 |
191 // overrides from GrDrawTarget | 191 // overrides from GrDrawTarget |
192 void onDraw(const GrDrawState&, | 192 void onDraw(const GrDrawState&, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 const GrOptDrawState* fPrevState; | 255 const GrOptDrawState* fPrevState; |
256 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; | 256 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; |
257 SkTDArray<char> fPathIndexBuffer; | 257 SkTDArray<char> fPathIndexBuffer; |
258 SkTDArray<float> fPathTransformBuffer; | 258 SkTDArray<float> fPathTransformBuffer; |
259 uint32_t fDrawID; | 259 uint32_t fDrawID; |
260 | 260 |
261 typedef GrFlushToGpuDrawTarget INHERITED; | 261 typedef GrFlushToGpuDrawTarget INHERITED; |
262 }; | 262 }; |
263 | 263 |
264 #endif | 264 #endif |
OLD | NEW |