| 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 GrGLGeometryProcessor_DEFINED | 8 #ifndef GrGLGeometryProcessor_DEFINED |
| 9 #define GrGLGeometryProcessor_DEFINED | 9 #define GrGLGeometryProcessor_DEFINED |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 /** a helper which can setup vertex, constant, or uniform color depending on
inputType. | 76 /** a helper which can setup vertex, constant, or uniform color depending on
inputType. |
| 77 * This function will only do the minimum required to emit the correct shad
er code. If | 77 * This function will only do the minimum required to emit the correct shad
er code. If |
| 78 * inputType == attribute, then colorAttr must not be NULL. Likewise, if i
nputType == Uniform | 78 * inputType == attribute, then colorAttr must not be NULL. Likewise, if i
nputType == Uniform |
| 79 * then colorUniform must not be NULL. | 79 * then colorUniform must not be NULL. |
| 80 */ | 80 */ |
| 81 void setupColorPassThrough(GrGLGPBuilder* pb, | 81 void setupColorPassThrough(GrGLGPBuilder* pb, |
| 82 GrGPInput inputType, | 82 GrGPInput inputType, |
| 83 const char* inputName, | 83 const char* inputName, |
| 84 const GrGeometryProcessor::GrAttribute* colorAttr
, | 84 const GrGeometryProcessor::Attribute* colorAttr, |
| 85 UniformHandle* colorUniform); | 85 UniformHandle* colorUniform); |
| 86 | 86 |
| 87 const char* uViewM() const { return fViewMatrixName; } | 87 const char* uViewM() const { return fViewMatrixName; } |
| 88 | 88 |
| 89 /** a helper function to setup the uniform handle for the uniform view matri
x */ | 89 /** a helper function to setup the uniform handle for the uniform view matri
x */ |
| 90 void addUniformViewMatrix(GrGLGPBuilder*); | 90 void addUniformViewMatrix(GrGLGPBuilder*); |
| 91 | 91 |
| 92 | 92 |
| 93 /** a helper function to upload a uniform viewmatrix. | 93 /** a helper function to upload a uniform viewmatrix. |
| 94 * TODO we can remove this function when we have deferred geometry in place | 94 * TODO we can remove this function when we have deferred geometry in place |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 virtual void didSetData(GrGLPathRendering*) {} | 197 virtual void didSetData(GrGLPathRendering*) {} |
| 198 | 198 |
| 199 private: | 199 private: |
| 200 UniformHandle fColorUniform; | 200 UniformHandle fColorUniform; |
| 201 GrColor fColor; | 201 GrColor fColor; |
| 202 | 202 |
| 203 typedef GrGLPrimitiveProcessor INHERITED; | 203 typedef GrGLPrimitiveProcessor INHERITED; |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 #endif | 206 #endif |
| OLD | NEW |