| 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 GrGpu_DEFINED | 8 #ifndef GrGpu_DEFINED |
| 9 #define GrGpu_DEFINED | 9 #define GrGpu_DEFINED |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 * | 135 * |
| 136 * @param size size in bytes of the index buffer | 136 * @param size size in bytes of the index buffer |
| 137 * @param dynamic hints whether the data will be frequently changed | 137 * @param dynamic hints whether the data will be frequently changed |
| 138 * by either GrIndexBuffer::map() or | 138 * by either GrIndexBuffer::map() or |
| 139 * GrIndexBuffer::updateData(). | 139 * GrIndexBuffer::updateData(). |
| 140 * | 140 * |
| 141 * @return The index buffer if successful, otherwise NULL. | 141 * @return The index buffer if successful, otherwise NULL. |
| 142 */ | 142 */ |
| 143 GrIndexBuffer* createIndexBuffer(size_t size, bool dynamic); | 143 GrIndexBuffer* createIndexBuffer(size_t size, bool dynamic); |
| 144 | 144 |
| 145 //TODO comment |
| 146 GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, |
| 147 int patternSize, |
| 148 int reps, |
| 149 int vertCount, |
| 150 bool isDynamic = false) const; |
| 151 |
| 145 /** | 152 /** |
| 146 * Returns an index buffer that can be used to render quads. | 153 * Returns an index buffer that can be used to render quads. |
| 147 * Six indices per quad: 0, 1, 2, 0, 2, 3, etc. | 154 * Six indices per quad: 0, 1, 2, 0, 2, 3, etc. |
| 148 * The max number of quads can be queried using GrIndexBuffer::maxQuads(). | 155 * The max number of quads can be queried using GrIndexBuffer::maxQuads(). |
| 149 * Draw with kTriangles_GrPrimitiveType | 156 * Draw with kTriangles_GrPrimitiveType |
| 150 * @ return the quad index buffer | 157 * @ return the quad index buffer |
| 151 */ | 158 */ |
| 152 const GrIndexBuffer* getQuadIndexBuffer() const; | 159 const GrIndexBuffer* getQuadIndexBuffer() const; |
| 153 | 160 |
| 154 /** | 161 /** |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 // counts number of uses of vertex/index pool in the geometry stack | 516 // counts number of uses of vertex/index pool in the geometry stack |
| 510 int fVertexP
oolUseCnt; | 517 int fVertexP
oolUseCnt; |
| 511 int fIndexPo
olUseCnt; | 518 int fIndexPo
olUseCnt; |
| 512 // these are mutable so they can be created on-demand | 519 // these are mutable so they can be created on-demand |
| 513 mutable GrIndexBuffer* fQuadInd
exBuffer; | 520 mutable GrIndexBuffer* fQuadInd
exBuffer; |
| 514 | 521 |
| 515 typedef GrDrawTarget INHERITED; | 522 typedef GrDrawTarget INHERITED; |
| 516 }; | 523 }; |
| 517 | 524 |
| 518 #endif | 525 #endif |
| OLD | NEW |