| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 class GrGLGPBuilder : public virtual GrGLUniformBuilder { | 127 class GrGLGPBuilder : public virtual GrGLUniformBuilder { |
| 128 public: | 128 public: |
| 129 /* | 129 /* |
| 130 * addVarying allows fine grained control for setting up varyings between st
ages. If you just | 130 * addVarying allows fine grained control for setting up varyings between st
ages. If you just |
| 131 * need to take an attribute and pass it through to an output value in a fra
gment shader, use | 131 * need to take an attribute and pass it through to an output value in a fra
gment shader, use |
| 132 * addPassThroughAttribute. | 132 * addPassThroughAttribute. |
| 133 * TODO convert most uses of addVarying to addPassThroughAttribute | 133 * TODO convert most uses of addVarying to addPassThroughAttribute |
| 134 */ | 134 */ |
| 135 virtual void addVarying(const char* name, | 135 virtual void addVarying(const char* name, |
| 136 GrGLVarying*, | 136 GrGLVarying*, |
| 137 GrGLShaderVar::Precision fsPrecision=GrGLShaderVar::
kDefault_Precision) = 0; | 137 GrSLPrecision fsPrecision = kDefault_GrSLPrecision)
= 0; |
| 138 | 138 |
| 139 /* | 139 /* |
| 140 * This call can be used by GP to pass an attribute through all shaders dire
ctly to 'output' in | 140 * This call can be used by GP to pass an attribute through all shaders dire
ctly to 'output' in |
| 141 * the fragment shader. Though this call effects both the vertex shader and
fragment shader, | 141 * the fragment shader. Though this call effects both the vertex shader and
fragment shader, |
| 142 * it expects 'output' to be defined in the fragment shader before this call
is made. | 142 * it expects 'output' to be defined in the fragment shader before this call
is made. |
| 143 * TODO it might be nicer behavior to have a flag to declare output inside t
his call | 143 * TODO it might be nicer behavior to have a flag to declare output inside t
his call |
| 144 */ | 144 */ |
| 145 virtual void addPassThroughAttribute(const GrGeometryProcessor::GrAttribute*
, | 145 virtual void addPassThroughAttribute(const GrGeometryProcessor::GrAttribute*
, |
| 146 const char* output) = 0; | 146 const char* output) = 0; |
| 147 | 147 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 virtual const GrGLContextInfo& ctxInfo() const SK_OVERRIDE; | 211 virtual const GrGLContextInfo& ctxInfo() const SK_OVERRIDE; |
| 212 | 212 |
| 213 virtual GrGpuGL* gpu() const SK_OVERRIDE { return fGpu; } | 213 virtual GrGpuGL* gpu() const SK_OVERRIDE { return fGpu; } |
| 214 | 214 |
| 215 virtual GrGLFPFragmentBuilder* getFragmentShaderBuilder() SK_OVERRIDE { retu
rn &fFS; } | 215 virtual GrGLFPFragmentBuilder* getFragmentShaderBuilder() SK_OVERRIDE { retu
rn &fFS; } |
| 216 virtual GrGLVertexBuilder* getVertexShaderBuilder() SK_OVERRIDE { return &fV
S; } | 216 virtual GrGLVertexBuilder* getVertexShaderBuilder() SK_OVERRIDE { return &fV
S; } |
| 217 | 217 |
| 218 virtual void addVarying( | 218 virtual void addVarying( |
| 219 const char* name, | 219 const char* name, |
| 220 GrGLVarying*, | 220 GrGLVarying*, |
| 221 GrGLShaderVar::Precision fsPrecision=GrGLShaderVar::kDefault_Precisi
on) SK_OVERRIDE; | 221 GrSLPrecision fsPrecision = kDefault_GrSLPrecision) SK_OVERRIDE; |
| 222 | 222 |
| 223 virtual void addPassThroughAttribute(const GrGeometryProcessor::GrAttribute*
, | 223 virtual void addPassThroughAttribute(const GrGeometryProcessor::GrAttribute*
, |
| 224 const char* output) SK_OVERRIDE; | 224 const char* output) SK_OVERRIDE; |
| 225 | 225 |
| 226 | 226 |
| 227 // Handles for program uniforms (other than per-effect uniforms) | 227 // Handles for program uniforms (other than per-effect uniforms) |
| 228 struct BuiltinUniformHandles { | 228 struct BuiltinUniformHandles { |
| 229 UniformHandle fViewMatrixUni; | 229 UniformHandle fViewMatrixUni; |
| 230 UniformHandle fRTAdjustmentUni; | 230 UniformHandle fRTAdjustmentUni; |
| 231 UniformHandle fColorUni; | 231 UniformHandle fColorUni; |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 SkAutoTDelete<GrGLFragmentProcessor> fGLProc; | 417 SkAutoTDelete<GrGLFragmentProcessor> fGLProc; |
| 418 SkSTArray<2, Transform, true> fTransforms; | 418 SkSTArray<2, Transform, true> fTransforms; |
| 419 }; | 419 }; |
| 420 | 420 |
| 421 struct GrGLInstalledFragProcs : public SkRefCnt { | 421 struct GrGLInstalledFragProcs : public SkRefCnt { |
| 422 virtual ~GrGLInstalledFragProcs(); | 422 virtual ~GrGLInstalledFragProcs(); |
| 423 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs; | 423 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs; |
| 424 }; | 424 }; |
| 425 | 425 |
| 426 #endif | 426 #endif |
| OLD | NEW |