| 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 CmdBuffer fCmdBuffer; | 313 CmdBuffer fCmdBuffer; |
| 314 SetState* fPrevState; | 314 SetState* fPrevState; |
| 315 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; | 315 SkTArray<GrTraceMarkerSet, false> fGpuCmdMarkers; |
| 316 SkTDArray<char> fPathIndexBuffer; | 316 SkTDArray<char> fPathIndexBuffer; |
| 317 SkTDArray<float> fPathTransformBuffer; | 317 SkTDArray<float> fPathTransformBuffer; |
| 318 uint32_t fDrawID; | 318 uint32_t fDrawID; |
| 319 GrBatchTarget fBatchTarget; | 319 GrBatchTarget fBatchTarget; |
| 320 // TODO hack until batch is everywhere | 320 // TODO hack until batch is everywhere |
| 321 DrawBatch* fDrawBatch; | 321 DrawBatch* fDrawBatch; |
| 322 | 322 |
| 323 void closeBatch(); | 323 // This will go away when everything uses batch. However, in the short term
anything which |
| 324 // might be put into the GrInOrderDrawBuffer needs to make sure it closes th
e last batch |
| 325 void closeBatch() { |
| 326 if (fDrawBatch) { |
| 327 fBatchTarget.resetNumberOfDraws(); |
| 328 fDrawBatch->execute(this, fPrevState); |
| 329 fDrawBatch->fBatch->setNumberOfDraws(fBatchTarget.numberOfDraws()); |
| 330 fDrawBatch = NULL; |
| 331 } |
| 332 } |
| 324 | 333 |
| 325 typedef GrFlushToGpuDrawTarget INHERITED; | 334 typedef GrFlushToGpuDrawTarget INHERITED; |
| 326 }; | 335 }; |
| 327 | 336 |
| 328 #endif | 337 #endif |
| OLD | NEW |