| 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 GrGLSLFragmentShaderBuilder_DEFINED | 8 #ifndef GrGLSLFragmentShaderBuilder_DEFINED |
| 9 #define GrGLSLFragmentShaderBuilder_DEFINED | 9 #define GrGLSLFragmentShaderBuilder_DEFINED |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 , fHasSecondaryOutput(false) { | 26 , fHasSecondaryOutput(false) { |
| 27 fSubstageIndices.push_back(0); | 27 fSubstageIndices.push_back(0); |
| 28 } | 28 } |
| 29 virtual ~GrGLSLFragmentBuilder() {} | 29 virtual ~GrGLSLFragmentBuilder() {} |
| 30 /** | 30 /** |
| 31 * Use of these features may require a GLSL extension to be enabled. Shaders
may not compile | 31 * Use of these features may require a GLSL extension to be enabled. Shaders
may not compile |
| 32 * if code is added that uses one of these features without calling enableFe
ature() | 32 * if code is added that uses one of these features without calling enableFe
ature() |
| 33 */ | 33 */ |
| 34 enum GLSLFeature { | 34 enum GLSLFeature { |
| 35 kStandardDerivatives_GLSLFeature = kLastGLSLPrivateFeature + 1, | 35 kStandardDerivatives_GLSLFeature = kLastGLSLPrivateFeature + 1, |
| 36 kPixelLocalStorage_GLSLFeature, | 36 kPixelLocalStorage_GLSLFeature |
| 37 kSampleVariables_GLSLFeature, | |
| 38 kSampleMaskOverrideCoverage_GLSLFeature | |
| 39 }; | 37 }; |
| 40 | 38 |
| 41 /** | 39 /** |
| 42 * If the feature is supported then true is returned and any necessary #exte
nsion declarations | 40 * If the feature is supported then true is returned and any necessary #exte
nsion declarations |
| 43 * are added to the shaders. If the feature is not supported then false will
be returned. | 41 * are added to the shaders. If the feature is not supported then false will
be returned. |
| 44 */ | 42 */ |
| 45 virtual bool enableFeature(GLSLFeature) = 0; | 43 virtual bool enableFeature(GLSLFeature) = 0; |
| 46 | 44 |
| 47 /** | 45 /** |
| 48 * This returns a variable name to access the 2D, perspective correct versio
n of the coords in | 46 * This returns a variable name to access the 2D, perspective correct versio
n of the coords in |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 bool fHasReadDstColor; | 185 bool fHasReadDstColor; |
| 188 bool fHasReadFragmentPosition; | 186 bool fHasReadFragmentPosition; |
| 189 | 187 |
| 190 friend class GrGLSLProgramBuilder; | 188 friend class GrGLSLProgramBuilder; |
| 191 friend class GrGLProgramBuilder; | 189 friend class GrGLProgramBuilder; |
| 192 | 190 |
| 193 typedef GrGLSLXPFragmentBuilder INHERITED; | 191 typedef GrGLSLXPFragmentBuilder INHERITED; |
| 194 }; | 192 }; |
| 195 | 193 |
| 196 #endif | 194 #endif |
| OLD | NEW |