| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrGLVertexShader_DEFINED | 8 #ifndef GrGLVertexShader_DEFINED |
| 9 #define GrGLVertexShader_DEFINED | 9 #define GrGLVertexShader_DEFINED |
| 10 #include "GrGLShaderBuilder.h" | 10 #include "GrGLShaderBuilder.h" |
| 11 | 11 |
| 12 class GrGLProgramBuilder; | 12 class GrGLProgramBuilder; |
| 13 | 13 |
| 14 class GrGLVertexShaderBuilder : public GrGLFullShaderBuilder { | 14 class GrGLVertexShaderBuilder : public GrGLFullShaderBuilder { |
| 15 public: | 15 public: |
| 16 GrGLVertexShaderBuilder(GrGLFullProgramBuilder* program); | 16 GrGLVertexShaderBuilder(GrGLFullProgramBuilder* program); |
| 17 | 17 |
| 18 /* | 18 /* |
| 19 * this call is only for GrGLProgramEffects' internal use | 19 * this call is only for GrGLProgramEffects' internal use |
| 20 */ | 20 */ |
| 21 void emitAttributes(const GrEffectStage& stage); | 21 void emitAttributes(const GrGeometryProcessor& gp); |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Are explicit local coordinates provided as input to the vertex shader. | 24 * Are explicit local coordinates provided as input to the vertex shader. |
| 25 */ | 25 */ |
| 26 bool hasExplicitLocalCoords() const { return (fLocalCoordsVar != fPositionVa
r); } | 26 bool hasExplicitLocalCoords() const { return (fLocalCoordsVar != fPositionVa
r); } |
| 27 | 27 |
| 28 const SkString* getEffectAttributeName(int attributeIndex) const; | 28 const SkString* getEffectAttributeName(int attributeIndex) const; |
| 29 | 29 |
| 30 /** Returns a vertex attribute that represents the local coords in the VS. T
his may be the same | 30 /** Returns a vertex attribute that represents the local coords in the VS. T
his may be the same |
| 31 as positionAttribute() or it may not be. It depends upon whether the ren
dering code | 31 as positionAttribute() or it may not be. It depends upon whether the ren
dering code |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 GrGLShaderVar* fPositionVar; | 70 GrGLShaderVar* fPositionVar; |
| 71 GrGLShaderVar* fLocalCoordsVar; | 71 GrGLShaderVar* fLocalCoordsVar; |
| 72 int fEffectAttribOffset; | 72 int fEffectAttribOffset; |
| 73 | 73 |
| 74 friend class GrGLFullProgramBuilder; | 74 friend class GrGLFullProgramBuilder; |
| 75 | 75 |
| 76 typedef GrGLFullShaderBuilder INHERITED; | 76 typedef GrGLFullShaderBuilder INHERITED; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif | 79 #endif |
| OLD | NEW |