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 #include "GrBatchTarget.h" | 8 #include "GrBatchTarget.h" |
9 | 9 |
10 #include "GrBufferAllocPool.h" | 10 #include "GrBufferAllocPool.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get(); | 23 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get(); |
24 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracker); | 24 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracker); |
25 | 25 |
26 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker); | 26 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker); |
27 for (int i = 0; i < bf->fDraws.count(); i++) { | 27 for (int i = 0; i < bf->fDraws.count(); i++) { |
28 fGpu->draw(args, bf->fDraws[i]); | 28 fGpu->draw(args, bf->fDraws[i]); |
29 } | 29 } |
30 } | 30 } |
31 fFlushBuffer.reset(); | 31 fFlushBuffer.reset(); |
32 }*/ | 32 }*/ |
| 33 /* |
| 34 void GrBatchTarget::flushNext(int n) { |
| 35 for (; n > 0; n--) { |
| 36 SkDEBUGCODE(bool verify =) fIter.next(); |
| 37 SkASSERT(verify); |
| 38 GrProgramDesc desc; |
| 39 BufferedFlush* bf = fIter.get(); |
| 40 const GrPipeline* pipeline = bf->fPipeline; |
| 41 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get(); |
| 42 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracker); |
33 | 43 |
34 void GrBatchTarget::flushNext() { | 44 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker); |
35 fIter.next(); | 45 for (int i = 0; i < bf->fDraws.count(); i++) { |
36 GrProgramDesc desc; | 46 fGpu->draw(args, bf->fDraws[i]); |
37 BufferedFlush* bf = fIter.get(); | 47 } |
38 const GrPipeline* pipeline = bf->fPipeline; | |
39 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get(); | |
40 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracker); | |
41 | |
42 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker); | |
43 for (int i = 0; i < bf->fDraws.count(); i++) { | |
44 fGpu->draw(args, bf->fDraws[i]); | |
45 } | 48 } |
46 } | 49 }*/ |
OLD | NEW |