Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: src/gpu/GrGeometryProcessor.h

Issue 1822343002: Make max number of vertex attributes be checked dynamically (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Address comment Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGeometryProcessor.h
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index 50d0bd51f8b077150f337bd0ea56c5399b52902c..05afd5329a20dd9694b44dea6d83db3009f07c5e 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; }
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698