| 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 "GrVertexBatch.h" | 8 #include "GrVertexBatch.h" |
| 9 #include "GrBatchFlushState.h" | 9 #include "GrBatchFlushState.h" |
| 10 #include "GrResourceProvider.h" | 10 #include "GrResourceProvider.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 for (SkTLList<DrawArray>::Iter da(fDrawArrays); da.get(); da.next()) { | 68 for (SkTLList<DrawArray>::Iter da(fDrawArrays); da.get(); da.next()) { |
| 69 state->advanceLastFlushedToken(); | 69 state->advanceLastFlushedToken(); |
| 70 while (currUpload < uploadCnt && | 70 while (currUpload < uploadCnt && |
| 71 fInlineUploads[currUpload]->lastUploadToken() <= state->lastFlush
edToken()) { | 71 fInlineUploads[currUpload]->lastUploadToken() <= state->lastFlush
edToken()) { |
| 72 fInlineUploads[currUpload++]->upload(state->uploader()); | 72 fInlineUploads[currUpload++]->upload(state->uploader()); |
| 73 } | 73 } |
| 74 const GrVertexBatch::DrawArray& drawArray = *da.get(); | 74 const GrVertexBatch::DrawArray& drawArray = *da.get(); |
| 75 GrProgramDesc desc; | 75 GrProgramDesc desc; |
| 76 const GrPipeline* pipeline = this->pipeline(); | 76 const GrPipeline* pipeline = this->pipeline(); |
| 77 const GrPrimitiveProcessor* primProc = drawArray.fPrimitiveProcessor.get
(); | 77 const GrPrimitiveProcessor* primProc = drawArray.fPrimitiveProcessor.get
(); |
| 78 state->gpu()->buildProgramDesc(&desc, *primProc, *pipeline, fBatchTracke
r); | 78 state->gpu()->buildProgramDesc(&desc, *primProc, *pipeline); |
| 79 GrGpu::DrawArgs args(primProc, pipeline, &desc, &fBatchTracker); | 79 GrGpu::DrawArgs args(primProc, pipeline, &desc); |
| 80 | 80 |
| 81 int drawCount = drawArray.fDraws.count(); | 81 int drawCount = drawArray.fDraws.count(); |
| 82 for (int i = 0; i < drawCount; i++) { | 82 for (int i = 0; i < drawCount; i++) { |
| 83 state->gpu()->draw(args, drawArray.fDraws[i]); | 83 state->gpu()->draw(args, drawArray.fDraws[i]); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 } | 86 } |
| OLD | NEW |