| 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 GrGLProgramBuilder_DEFINED | 8 #ifndef GrGLProgramBuilder_DEFINED |
| 9 #define GrGLProgramBuilder_DEFINED | 9 #define GrGLProgramBuilder_DEFINED |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 virtual void addVarying(const char* name, | 144 virtual void addVarying(const char* name, |
| 145 GrGLVarying*, | 145 GrGLVarying*, |
| 146 GrSLPrecision fsPrecision = kDefault_GrSLPrecision)
= 0; | 146 GrSLPrecision fsPrecision = kDefault_GrSLPrecision)
= 0; |
| 147 | 147 |
| 148 /* | 148 /* |
| 149 * This call can be used by GP to pass an attribute through all shaders dire
ctly to 'output' in | 149 * This call can be used by GP to pass an attribute through all shaders dire
ctly to 'output' in |
| 150 * the fragment shader. Though this call effects both the vertex shader and
fragment shader, | 150 * the fragment shader. Though this call effects both the vertex shader and
fragment shader, |
| 151 * it expects 'output' to be defined in the fragment shader before this call
is made. | 151 * it expects 'output' to be defined in the fragment shader before this call
is made. |
| 152 * TODO it might be nicer behavior to have a flag to declare output inside t
his call | 152 * TODO it might be nicer behavior to have a flag to declare output inside t
his call |
| 153 */ | 153 */ |
| 154 virtual void addPassThroughAttribute(const GrGeometryProcessor::GrAttribute*
, | 154 virtual void addPassThroughAttribute(const GrGeometryProcessor::Attribute*, |
| 155 const char* output) = 0; | 155 const char* output) = 0; |
| 156 | 156 |
| 157 // TODO rename getFragmentBuilder | 157 // TODO rename getFragmentBuilder |
| 158 virtual GrGLGPFragmentBuilder* getFragmentShaderBuilder() = 0; | 158 virtual GrGLGPFragmentBuilder* getFragmentShaderBuilder() = 0; |
| 159 virtual GrGLVertexBuilder* getVertexShaderBuilder() = 0; | 159 virtual GrGLVertexBuilder* getVertexShaderBuilder() = 0; |
| 160 | 160 |
| 161 /* | 161 /* |
| 162 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE | 162 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE |
| 163 */ | 163 */ |
| 164 }; | 164 }; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 GrGLGpu* gpu() const SK_OVERRIDE { return fGpu; } | 248 GrGLGpu* gpu() const SK_OVERRIDE { return fGpu; } |
| 249 | 249 |
| 250 GrGLFPFragmentBuilder* getFragmentShaderBuilder() SK_OVERRIDE { return &fFS;
} | 250 GrGLFPFragmentBuilder* getFragmentShaderBuilder() SK_OVERRIDE { return &fFS;
} |
| 251 GrGLVertexBuilder* getVertexShaderBuilder() SK_OVERRIDE { return &fVS; } | 251 GrGLVertexBuilder* getVertexShaderBuilder() SK_OVERRIDE { return &fVS; } |
| 252 | 252 |
| 253 void addVarying( | 253 void addVarying( |
| 254 const char* name, | 254 const char* name, |
| 255 GrGLVarying*, | 255 GrGLVarying*, |
| 256 GrSLPrecision fsPrecision = kDefault_GrSLPrecision) SK_OVERRIDE; | 256 GrSLPrecision fsPrecision = kDefault_GrSLPrecision) SK_OVERRIDE; |
| 257 | 257 |
| 258 void addPassThroughAttribute(const GrGeometryProcessor::GrAttribute*, | 258 void addPassThroughAttribute(const GrPrimitiveProcessor::Attribute*, |
| 259 const char* output) SK_OVERRIDE; | 259 const char* output) SK_OVERRIDE; |
| 260 | 260 |
| 261 | 261 |
| 262 // Handles for program uniforms (other than per-effect uniforms) | 262 // Handles for program uniforms (other than per-effect uniforms) |
| 263 struct BuiltinUniformHandles { | 263 struct BuiltinUniformHandles { |
| 264 UniformHandle fRTAdjustmentUni; | 264 UniformHandle fRTAdjustmentUni; |
| 265 | 265 |
| 266 // We use the render target height to provide a y-down frag coord when s
pecifying | 266 // We use the render target height to provide a y-down frag coord when s
pecifying |
| 267 // origin_upper_left is not supported. | 267 // origin_upper_left is not supported. |
| 268 UniformHandle fRTHeightUni; | 268 UniformHandle fRTHeightUni; |
| 269 | 269 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 UniformInfoArray fUniforms; | 389 UniformInfoArray fUniforms; |
| 390 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; | 390 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; |
| 391 GrGLPrimitiveProcessor::TransformsOut fOutCoords; | 391 GrGLPrimitiveProcessor::TransformsOut fOutCoords; |
| 392 | 392 |
| 393 friend class GrGLShaderBuilder; | 393 friend class GrGLShaderBuilder; |
| 394 friend class GrGLVertexBuilder; | 394 friend class GrGLVertexBuilder; |
| 395 friend class GrGLFragmentShaderBuilder; | 395 friend class GrGLFragmentShaderBuilder; |
| 396 friend class GrGLGeometryBuilder; | 396 friend class GrGLGeometryBuilder; |
| 397 }; | 397 }; |
| 398 #endif | 398 #endif |
| OLD | NEW |