| 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 GrGeometryProcessor_DEFINED | 8 #ifndef GrGeometryProcessor_DEFINED |
| 9 #define GrGeometryProcessor_DEFINED | 9 #define GrGeometryProcessor_DEFINED |
| 10 | 10 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 // TODO the Hint can be handled in a much more clean way when we have deferr
ed geometry or | 162 // TODO the Hint can be handled in a much more clean way when we have deferr
ed geometry or |
| 163 // atleast bundles | 163 // atleast bundles |
| 164 GrGeometryProcessor(GrColor color, bool opaqueVertexColors = false) | 164 GrGeometryProcessor(GrColor color, bool opaqueVertexColors = false) |
| 165 : fVertexStride(0) | 165 : fVertexStride(0) |
| 166 , fColor(color) | 166 , fColor(color) |
| 167 , fOpaqueVertexColors(opaqueVertexColors) | 167 , fOpaqueVertexColors(opaqueVertexColors) |
| 168 , fWillUseGeoShader(false) | 168 , fWillUseGeoShader(false) |
| 169 , fHasVertexColor(false) | 169 , fHasVertexColor(false) |
| 170 , fHasLocalCoords(false) {} | 170 , fHasLocalCoords(false) {} |
| 171 | 171 |
| 172 virtual const char* name() const = 0; | |
| 173 | |
| 174 /* | 172 /* |
| 175 * This is a safeguard to prevent GPs from going beyond platform specific at
tribute limits. | 173 * This is a safeguard to prevent GPs from going beyond platform specific at
tribute limits. |
| 176 * This number can almost certainly be raised if required. | 174 * This number can almost certainly be raised if required. |
| 177 */ | 175 */ |
| 178 static const int kMaxVertexAttribs = 6; | 176 static const int kMaxVertexAttribs = 6; |
| 179 | 177 |
| 180 struct GrAttribute { | 178 struct GrAttribute { |
| 181 GrAttribute(const char* name, GrVertexAttribType type) | 179 GrAttribute(const char* name, GrVertexAttribType type) |
| 182 : fName(name) | 180 : fName(name) |
| 183 , fType(type) | 181 , fType(type) |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 337 |
| 340 virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) co
nst SK_OVERRIDE; | 338 virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) co
nst SK_OVERRIDE; |
| 341 | 339 |
| 342 private: | 340 private: |
| 343 GrPathProcessor(GrColor color); | 341 GrPathProcessor(GrColor color); |
| 344 GrColor fColor; | 342 GrColor fColor; |
| 345 | 343 |
| 346 typedef GrProcessor INHERITED; | 344 typedef GrProcessor INHERITED; |
| 347 }; | 345 }; |
| 348 #endif | 346 #endif |
| OLD | NEW |