Chromium Code Reviews| Index: src/gpu/GrDrawState.h |
| diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h |
| index dcd6ff9aaf8459f03ee68ec12b65c7e38311c02c..0da6d782c286dfc883f871b27d62f2b8a129da62 100644 |
| --- a/src/gpu/GrDrawState.h |
| +++ b/src/gpu/GrDrawState.h |
| @@ -80,8 +80,8 @@ public: |
| * Sets vertex attributes for next draw. The object driving the templatization |
| * should be a global GrVertexAttrib array that is never changed. |
| */ |
| - template <const GrVertexAttrib A[]> void setVertexAttribs(int count) { |
| - this->setVertexAttribs(A, count); |
| + template <const GrVertexAttrib A[]> void setVertexAttribs(int count, size_t stride) { |
| + this->setVertexAttribs(A, count, stride); |
| } |
| /** |
| @@ -97,12 +97,13 @@ public: |
| public: |
| AutoVertexAttribRestore(GrDrawState* drawState); |
| - ~AutoVertexAttribRestore() { fDrawState->setVertexAttribs(fVAPtr, fVACount); } |
| + ~AutoVertexAttribRestore() { fDrawState->setVertexAttribs(fVAPtr, fVACount, fVAStride); } |
| private: |
| GrDrawState* fDrawState; |
| const GrVertexAttrib* fVAPtr; |
| int fVACount; |
| + size_t fVAStride; |
| }; |
| /// @} |
| @@ -565,7 +566,7 @@ private: |
| * @param attribs the array of vertex attributes to set. |
| * @param count the number of attributes being set, limited to kMaxVertexAttribCnt. |
|
bsalomon
2014/08/27 17:46:28
update comment? Maybe move the params comments to
egdaniel
2014/08/27 18:33:55
Done.
|
| */ |
| - void setVertexAttribs(const GrVertexAttrib attribs[], int count); |
| + void setVertexAttribs(const GrVertexAttrib attribs[], int count, size_t stride); |
| typedef GrRODrawState INHERITED; |
| }; |