| 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 11 matching lines...) Expand all Loading... |
| 22 class GrGLSLFragmentBuilder : public GrGLSLShaderBuilder { | 22 class GrGLSLFragmentBuilder : public GrGLSLShaderBuilder { |
| 23 public: | 23 public: |
| 24 GrGLSLFragmentBuilder(GrGLSLProgramBuilder* program) : INHERITED(program) {} | 24 GrGLSLFragmentBuilder(GrGLSLProgramBuilder* program) : INHERITED(program) {} |
| 25 virtual ~GrGLSLFragmentBuilder() {} | 25 virtual ~GrGLSLFragmentBuilder() {} |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * Use of these features may require a GLSL extension to be enabled. Shaders
may not compile | 28 * Use of these features may require a GLSL extension to be enabled. Shaders
may not compile |
| 29 * if code is added that uses one of these features without calling enableFe
ature() | 29 * if code is added that uses one of these features without calling enableFe
ature() |
| 30 */ | 30 */ |
| 31 enum GLSLFeature { | 31 enum GLSLFeature { |
| 32 kStandardDerivatives_GLSLFeature = kLastGLSLPrivateFeature + 1, | 32 kPixelLocalStorage_GLSLFeature = kLastGLSLPrivateFeature + 1, |
| 33 kPixelLocalStorage_GLSLFeature, | |
| 34 kMultisampleInterpolation_GLSLFeature | 33 kMultisampleInterpolation_GLSLFeature |
| 35 }; | 34 }; |
| 36 | 35 |
| 37 /** | 36 /** |
| 38 * If the feature is supported then true is returned and any necessary #exte
nsion declarations | 37 * 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. | 38 * are added to the shaders. If the feature is not supported then false will
be returned. |
| 40 */ | 39 */ |
| 41 virtual bool enableFeature(GLSLFeature) = 0; | 40 virtual bool enableFeature(GLSLFeature) = 0; |
| 42 | 41 |
| 43 /** | 42 /** |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 // the program creator | 245 // the program creator |
| 247 GrProcessor::RequiredFeatures fUsedProcessorFeatures; | 246 GrProcessor::RequiredFeatures fUsedProcessorFeatures; |
| 248 bool fHasReadDstColor; | 247 bool fHasReadDstColor; |
| 249 #endif | 248 #endif |
| 250 | 249 |
| 251 friend class GrGLSLProgramBuilder; | 250 friend class GrGLSLProgramBuilder; |
| 252 friend class GrGLProgramBuilder; | 251 friend class GrGLProgramBuilder; |
| 253 }; | 252 }; |
| 254 | 253 |
| 255 #endif | 254 #endif |
| OLD | NEW |