aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGeometryProcessor.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-03-23 10:40:53 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-23 10:40:53 -0700
commit7dbd45d2c7427d2c679d6507435d2f0220bf64ef (patch)
treeae53a6f2d968b65da8706e791617988e86af3118 /src/gpu/GrGeometryProcessor.h
parent1443c6920c4b7aa80811c30ed9cdc81395d5df4f (diff)
Make max number of vertex attributes be checked dynamically
Diffstat (limited to 'src/gpu/GrGeometryProcessor.h')
-rw-r--r--src/gpu/GrGeometryProcessor.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index 50d0bd51f8..05afd5329a 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -44,10 +44,9 @@ protected:
* GrGeometryProcessor.
*/
const Attribute& addVertexAttrib(const Attribute& attribute) {
- SkASSERT(fNumAttribs < kMaxVertexAttribs);
fVertexStride += attribute.fOffset;
- fAttribs[fNumAttribs] = attribute;
- return fAttribs[fNumAttribs++];
+ fAttribs.push_back(attribute);
+ return fAttribs.back();
}
void setWillUseGeoShader() { fWillUseGeoShader = true; }