| 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 #ifndef GrVertexBatch_DEFINED | 8 #ifndef GrVertexBatch_DEFINED |
| 9 #define GrVertexBatch_DEFINED | 9 #define GrVertexBatch_DEFINED |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 using InstancedHelper::recordDraw; | 59 using InstancedHelper::recordDraw; |
| 60 private: | 60 private: |
| 61 typedef InstancedHelper INHERITED; | 61 typedef InstancedHelper INHERITED; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 void onPrepare(GrBatchFlushState* state) final; | 65 void onPrepare(GrBatchFlushState* state) final; |
| 66 void onDraw(GrBatchFlushState* state) final; | 66 void onDraw(GrBatchFlushState* state) final; |
| 67 | 67 |
| 68 virtual void onPrepareDraws(Target*) = 0; | 68 virtual void onPrepareDraws(Target*) const = 0; |
| 69 | 69 |
| 70 // A set of contiguous draws with no inline uploads between them that all us
e the same | 70 // A set of contiguous draws with no inline uploads between them that all us
e the same |
| 71 // primitive processor. All the draws in a DrawArray share a primitive proce
ssor and use the | 71 // primitive processor. All the draws in a DrawArray share a primitive proce
ssor and use the |
| 72 // the batch's GrPipeline. | 72 // the batch's GrPipeline. |
| 73 struct DrawArray { | 73 struct DrawArray { |
| 74 SkSTArray<1, GrVertices, true> fDraws; | 74 SkSTArray<1, GrVertices, true> fDraws; |
| 75 GrPendingProgramElement<const GrPrimitiveProcessor> fPrimitiveProcessor; | 75 GrPendingProgramElement<const GrPrimitiveProcessor> fPrimitiveProcessor; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 // Array of DrawArray. There may be inline uploads between each DrawArray an
d each DrawArray | 78 // Array of DrawArray. There may be inline uploads between each DrawArray an
d each DrawArray |
| 79 // may use a different primitive processor. | 79 // may use a different primitive processor. |
| 80 typedef SkTLList<DrawArray, 4> DrawArrayList; | 80 typedef SkTLList<DrawArray, 4> DrawArrayList; |
| 81 DrawArrayList fDrawArrays; | 81 DrawArrayList fDrawArrays; |
| 82 | 82 |
| 83 typedef GrDrawBatch INHERITED; | 83 typedef GrDrawBatch INHERITED; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 #endif | 86 #endif |
| OLD | NEW |