| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrGLSLProgramBuilder_DEFINED | 8 #ifndef GrGLSLProgramBuilder_DEFINED |
| 9 #define GrGLSLProgramBuilder_DEFINED | 9 #define GrGLSLProgramBuilder_DEFINED |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 outName); | 58 outName); |
| 59 } | 59 } |
| 60 | 60 |
| 61 virtual const GrGLSLShaderVar& getUniformVariable(UniformHandle u) const = 0
; | 61 virtual const GrGLSLShaderVar& getUniformVariable(UniformHandle u) const = 0
; |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * Shortcut for getUniformVariable(u).c_str() | 64 * Shortcut for getUniformVariable(u).c_str() |
| 65 */ | 65 */ |
| 66 virtual const char* getUniformCStr(UniformHandle u) const = 0; | 66 virtual const char* getUniformCStr(UniformHandle u) const = 0; |
| 67 | 67 |
| 68 virtual const GrGLSLCaps* glslCaps() const = 0; | |
| 69 | |
| 70 /* | 68 /* |
| 71 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE | 69 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE |
| 72 */ | 70 */ |
| 73 protected: | 71 protected: |
| 74 virtual UniformHandle internalAddUniformArray( | 72 virtual UniformHandle internalAddUniformArray( |
| 75 uint32_t visibility, | 73 uint32_t visibility, |
| 76 GrSLType type, | 74 GrSLType type, |
| 77 GrSLPrecision precision, | 75 GrSLPrecision precision, |
| 78 const char* name, | 76 const char* name, |
| 79 bool mangleName, | 77 bool mangleName, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE | 184 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE |
| 187 */ | 185 */ |
| 188 }; | 186 }; |
| 189 | 187 |
| 190 class GrGLSLProgramBuilder : public GrGLSLGPBuilder, | 188 class GrGLSLProgramBuilder : public GrGLSLGPBuilder, |
| 191 public GrGLSLFPBuilder, | 189 public GrGLSLFPBuilder, |
| 192 public GrGLSLXPBuilder { | 190 public GrGLSLXPBuilder { |
| 193 public: | 191 public: |
| 194 typedef GrGpu::DrawArgs DrawArgs; | 192 typedef GrGpu::DrawArgs DrawArgs; |
| 195 | 193 |
| 194 virtual const GrGLSLCaps* glslCaps() const = 0; |
| 195 |
| 196 // Handles for program uniforms (other than per-effect uniforms) | 196 // Handles for program uniforms (other than per-effect uniforms) |
| 197 struct BuiltinUniformHandles { | 197 struct BuiltinUniformHandles { |
| 198 UniformHandle fRTAdjustmentUni; | 198 UniformHandle fRTAdjustmentUni; |
| 199 | 199 |
| 200 // We use the render target height to provide a y-down frag coord when s
pecifying | 200 // We use the render target height to provide a y-down frag coord when s
pecifying |
| 201 // origin_upper_left is not supported. | 201 // origin_upper_left is not supported. |
| 202 UniformHandle fRTHeightUni; | 202 UniformHandle fRTHeightUni; |
| 203 }; | 203 }; |
| 204 | 204 |
| 205 protected: | 205 protected: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 private: | 244 private: |
| 245 virtual void onAppendUniformDecls(ShaderVisibility visibility, SkString* out
) const = 0; | 245 virtual void onAppendUniformDecls(ShaderVisibility visibility, SkString* out
) const = 0; |
| 246 | 246 |
| 247 friend class GrGLSLShaderBuilder; | 247 friend class GrGLSLShaderBuilder; |
| 248 friend class GrGLSLVertexBuilder; | 248 friend class GrGLSLVertexBuilder; |
| 249 friend class GrGLSLFragmentShaderBuilder; | 249 friend class GrGLSLFragmentShaderBuilder; |
| 250 friend class GrGLSLGeometryBuilder; | 250 friend class GrGLSLGeometryBuilder; |
| 251 }; | 251 }; |
| 252 | 252 |
| 253 #endif | 253 #endif |
| OLD | NEW |