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