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

Side by Side Diff: src/gpu/GrPrimitiveProcessor.h

Issue 1663513004: Increase max vertex attrib count in GrPrimitiveProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 GrPrimitiveProcessor_DEFINED 8 #ifndef GrPrimitiveProcessor_DEFINED
9 #define GrPrimitiveProcessor_DEFINED 9 #define GrPrimitiveProcessor_DEFINED
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 class GrPrimitiveProcessor : public GrProcessor { 148 class GrPrimitiveProcessor : public GrProcessor {
149 public: 149 public:
150 // Only the GrGeometryProcessor subclass actually has a geo shader or vertex attributes, but 150 // Only the GrGeometryProcessor subclass actually has a geo shader or vertex attributes, but
151 // we put these calls on the base class to prevent having to cast 151 // we put these calls on the base class to prevent having to cast
152 virtual bool willUseGeoShader() const = 0; 152 virtual bool willUseGeoShader() const = 0;
153 153
154 /* 154 /*
155 * This is a safeguard to prevent GrPrimitiveProcessor's from going beyond p latform specific 155 * This is a safeguard to prevent GrPrimitiveProcessor's from going beyond p latform specific
156 * attribute limits. This number can almost certainly be raised if required. 156 * attribute limits. This number can almost certainly be raised if required.
157 */ 157 */
158 static const int kMaxVertexAttribs = 6; 158 static const int kMaxVertexAttribs = 8;
159 159
160 struct Attribute { 160 struct Attribute {
161 Attribute() 161 Attribute()
162 : fName(nullptr) 162 : fName(nullptr)
163 , fType(kFloat_GrVertexAttribType) 163 , fType(kFloat_GrVertexAttribType)
164 , fOffset(0) {} 164 , fOffset(0) {}
165 Attribute(const char* name, GrVertexAttribType type, 165 Attribute(const char* name, GrVertexAttribType type,
166 GrSLPrecision precision = kDefault_GrSLPrecision) 166 GrSLPrecision precision = kDefault_GrSLPrecision)
167 : fName(name) 167 : fName(name)
168 , fType(type) 168 , fType(type)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 size_t fVertexStride; 236 size_t fVertexStride;
237 237
238 private: 238 private:
239 void notifyRefCntIsZero() const final {}; 239 void notifyRefCntIsZero() const final {};
240 virtual bool hasExplicitLocalCoords() const = 0; 240 virtual bool hasExplicitLocalCoords() const = 0;
241 241
242 typedef GrProcessor INHERITED; 242 typedef GrProcessor INHERITED;
243 }; 243 };
244 244
245 #endif 245 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698