| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 * to be used. | 227 * to be used. |
| 228 * @return true if generation was successful. | 228 * @return true if generation was successful. |
| 229 */ | 229 */ |
| 230 static GrGLProgram* CreateProgram(const DrawArgs&, GrGLGpu*); | 230 static GrGLProgram* CreateProgram(const DrawArgs&, GrGLGpu*); |
| 231 | 231 |
| 232 UniformHandle addUniformArray(uint32_t visibility, | 232 UniformHandle addUniformArray(uint32_t visibility, |
| 233 GrSLType type, | 233 GrSLType type, |
| 234 GrSLPrecision precision, | 234 GrSLPrecision precision, |
| 235 const char* name, | 235 const char* name, |
| 236 int arrayCount, | 236 int arrayCount, |
| 237 const char** outName) SK_OVERRIDE; | 237 const char** outName) override; |
| 238 | 238 |
| 239 const GrGLShaderVar& getUniformVariable(UniformHandle u) const SK_OVERRIDE { | 239 const GrGLShaderVar& getUniformVariable(UniformHandle u) const override { |
| 240 return fUniforms[u.toShaderBuilderIndex()].fVariable; | 240 return fUniforms[u.toShaderBuilderIndex()].fVariable; |
| 241 } | 241 } |
| 242 | 242 |
| 243 const char* getUniformCStr(UniformHandle u) const SK_OVERRIDE { | 243 const char* getUniformCStr(UniformHandle u) const override { |
| 244 return this->getUniformVariable(u).c_str(); | 244 return this->getUniformVariable(u).c_str(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 const GrGLContextInfo& ctxInfo() const SK_OVERRIDE; | 247 const GrGLContextInfo& ctxInfo() const override; |
| 248 | 248 |
| 249 GrGLGpu* gpu() const SK_OVERRIDE { return fGpu; } | 249 GrGLGpu* gpu() const override { return fGpu; } |
| 250 | 250 |
| 251 GrGLFPFragmentBuilder* getFragmentShaderBuilder() SK_OVERRIDE { return &fFS;
} | 251 GrGLFPFragmentBuilder* getFragmentShaderBuilder() override { return &fFS; } |
| 252 GrGLVertexBuilder* getVertexShaderBuilder() SK_OVERRIDE { return &fVS; } | 252 GrGLVertexBuilder* getVertexShaderBuilder() override { return &fVS; } |
| 253 | 253 |
| 254 void addVarying( | 254 void addVarying( |
| 255 const char* name, | 255 const char* name, |
| 256 GrGLVarying*, | 256 GrGLVarying*, |
| 257 GrSLPrecision fsPrecision = kDefault_GrSLPrecision) SK_OVERRIDE; | 257 GrSLPrecision fsPrecision = kDefault_GrSLPrecision) override; |
| 258 | 258 |
| 259 void addPassThroughAttribute(const GrPrimitiveProcessor::Attribute*, | 259 void addPassThroughAttribute(const GrPrimitiveProcessor::Attribute*, |
| 260 const char* output) SK_OVERRIDE; | 260 const char* output) override; |
| 261 | 261 |
| 262 | 262 |
| 263 // Handles for program uniforms (other than per-effect uniforms) | 263 // Handles for program uniforms (other than per-effect uniforms) |
| 264 struct BuiltinUniformHandles { | 264 struct BuiltinUniformHandles { |
| 265 UniformHandle fRTAdjustmentUni; | 265 UniformHandle fRTAdjustmentUni; |
| 266 | 266 |
| 267 // We use the render target height to provide a y-down frag coord when s
pecifying | 267 // We use the render target height to provide a y-down frag coord when s
pecifying |
| 268 // origin_upper_left is not supported. | 268 // origin_upper_left is not supported. |
| 269 UniformHandle fRTHeightUni; | 269 UniformHandle fRTHeightUni; |
| 270 }; | 270 }; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 UniformInfoArray fUniforms; | 391 UniformInfoArray fUniforms; |
| 392 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; | 392 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms; |
| 393 GrGLPrimitiveProcessor::TransformsOut fOutCoords; | 393 GrGLPrimitiveProcessor::TransformsOut fOutCoords; |
| 394 | 394 |
| 395 friend class GrGLShaderBuilder; | 395 friend class GrGLShaderBuilder; |
| 396 friend class GrGLVertexBuilder; | 396 friend class GrGLVertexBuilder; |
| 397 friend class GrGLFragmentShaderBuilder; | 397 friend class GrGLFragmentShaderBuilder; |
| 398 friend class GrGLGeometryBuilder; | 398 friend class GrGLGeometryBuilder; |
| 399 }; | 399 }; |
| 400 #endif | 400 #endif |
| OLD | NEW |