| OLD | NEW |
| 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 virtual bool willUseGeoShader() const = 0; | 186 virtual bool willUseGeoShader() const = 0; |
| 187 | 187 |
| 188 /* | 188 /* |
| 189 * This is a safeguard to prevent GrPrimitiveProcessor's from going beyond p
latform specific | 189 * This is a safeguard to prevent GrPrimitiveProcessor's from going beyond p
latform specific |
| 190 * attribute limits. This number can almost certainly be raised if required. | 190 * attribute limits. This number can almost certainly be raised if required. |
| 191 */ | 191 */ |
| 192 static const int kMaxVertexAttribs = 6; | 192 static const int kMaxVertexAttribs = 6; |
| 193 | 193 |
| 194 struct Attribute { | 194 struct Attribute { |
| 195 Attribute() | 195 Attribute() |
| 196 : fName(NULL) | 196 : fName(nullptr) |
| 197 , fType(kFloat_GrVertexAttribType) | 197 , fType(kFloat_GrVertexAttribType) |
| 198 , fOffset(0) {} | 198 , fOffset(0) {} |
| 199 Attribute(const char* name, GrVertexAttribType type, | 199 Attribute(const char* name, GrVertexAttribType type, |
| 200 GrSLPrecision precision = kDefault_GrSLPrecision) | 200 GrSLPrecision precision = kDefault_GrSLPrecision) |
| 201 : fName(name) | 201 : fName(name) |
| 202 , fType(type) | 202 , fType(type) |
| 203 , fOffset(SkAlign4(GrVertexAttribTypeSize(type))) | 203 , fOffset(SkAlign4(GrVertexAttribTypeSize(type))) |
| 204 , fPrecision(precision) {} | 204 , fPrecision(precision) {} |
| 205 const char* fName; | 205 const char* fName; |
| 206 GrVertexAttribType fType; | 206 GrVertexAttribType fType; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 private: | 266 private: |
| 267 virtual bool hasExplicitLocalCoords() const = 0; | 267 virtual bool hasExplicitLocalCoords() const = 0; |
| 268 | 268 |
| 269 bool fIsPathRendering; | 269 bool fIsPathRendering; |
| 270 | 270 |
| 271 typedef GrProcessor INHERITED; | 271 typedef GrProcessor INHERITED; |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 #endif | 274 #endif |
| OLD | NEW |