Index: src/gpu/gl/builders/GrGLFragmentShaderBuilder.h |
diff --git a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h |
index 7afc76c711b5d2bdcb1775247a10a5d0facd8924..c6d99abc8fef1aef4ed659337471d2dc15e7ce81 100644 |
--- a/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h |
+++ b/src/gpu/gl/builders/GrGLFragmentShaderBuilder.h |
@@ -66,6 +66,11 @@ public: |
no effect advertised that it will read the destination. */ |
virtual const char* dstColor() = 0; |
+ /** Adds the necessary qualifiers that legalize the supplied blend equation with this shader. |
+ It is only legal to call this method with an advanced blend equation, and only if the GLSL |
+ caps report that these equations must be enabled. */ |
+ virtual void enableAdvancedBlendEquation(GrBlendEquation) = 0; |
+ |
private: |
typedef GrGLFragmentBuilder INHERITED; |
}; |
@@ -95,6 +100,8 @@ public: |
const char* fragmentPosition() override; |
const char* dstColor() override; |
+ void enableAdvancedBlendEquation(GrBlendEquation) override; |
+ |
private: |
// Private public interface, used by GrGLProgramBuilder to build a fragment shader |
void enableCustomOutput(); |
@@ -123,7 +130,8 @@ private: |
*/ |
enum GLSLPrivateFeature { |
kFragCoordConventions_GLSLPrivateFeature = kLastGLSLFeature + 1, |
- kLastGLSLPrivateFeature = kFragCoordConventions_GLSLPrivateFeature |
+ kBlendEquationAdvanced_GLSLPrivateFeature, |
+ kLastGLSLPrivateFeature = kBlendEquationAdvanced_GLSLPrivateFeature |
}; |
// Interpretation of DstReadKey when generating code |