Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Unified Diff: src/gpu/gl/builders/GrGLFragmentShaderBuilder.h

Issue 1037123003: Implement support for KHR_blend_equation_advanced (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_zzz2_barriers
Patch Set: Rename blendEquationAdvancedIsKHR to mustEnableAdvancedBlendEquations Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698