| 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 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 GrGLSLFragmentBuilder(GrGLSLProgramBuilder* program) : INHERITED(program) {} | 25 GrGLSLFragmentBuilder(GrGLSLProgramBuilder* program) : INHERITED(program) {} |
| 26 virtual ~GrGLSLFragmentBuilder() {} | 26 virtual ~GrGLSLFragmentBuilder() {} |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * Use of these features may require a GLSL extension to be enabled. Shaders
may not compile | 29 * Use of these features may require a GLSL extension to be enabled. Shaders
may not compile |
| 30 * if code is added that uses one of these features without calling enableFe
ature() | 30 * if code is added that uses one of these features without calling enableFe
ature() |
| 31 */ | 31 */ |
| 32 enum GLSLFeature { | 32 enum GLSLFeature { |
| 33 kStandardDerivatives_GLSLFeature = kLastGLSLPrivateFeature + 1, | 33 kStandardDerivatives_GLSLFeature = kLastGLSLPrivateFeature + 1, |
| 34 kPixelLocalStorage_GLSLFeature | 34 kPixelLocalStorage_GLSLFeature, |
| 35 kMultisampleInterpolation_GLSLFeature |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 /** | 38 /** |
| 38 * If the feature is supported then true is returned and any necessary #exte
nsion declarations | 39 * If the feature is supported then true is returned and any necessary #exte
nsion declarations |
| 39 * are added to the shaders. If the feature is not supported then false will
be returned. | 40 * are added to the shaders. If the feature is not supported then false will
be returned. |
| 40 */ | 41 */ |
| 41 virtual bool enableFeature(GLSLFeature) = 0; | 42 virtual bool enableFeature(GLSLFeature) = 0; |
| 42 | 43 |
| 43 /** | 44 /** |
| 44 * This returns a variable name to access the 2D, perspective correct versio
n of the coords in | 45 * This returns a variable name to access the 2D, perspective correct versio
n of the coords in |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 // the program creator | 237 // the program creator |
| 237 GrProcessor::RequiredFeatures fUsedProcessorFeatures; | 238 GrProcessor::RequiredFeatures fUsedProcessorFeatures; |
| 238 bool fHasReadDstColor; | 239 bool fHasReadDstColor; |
| 239 #endif | 240 #endif |
| 240 | 241 |
| 241 friend class GrGLSLProgramBuilder; | 242 friend class GrGLSLProgramBuilder; |
| 242 friend class GrGLProgramBuilder; | 243 friend class GrGLProgramBuilder; |
| 243 }; | 244 }; |
| 244 | 245 |
| 245 #endif | 246 #endif |
| OLD | NEW |