| Index: src/gpu/gl/GrGLCaps.h
|
| diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
|
| index 13ba3863b1228efc806a0da20e7c0f0fee30604b..5f98b7661c9cf4dae0d5d0fd0ce93e506d1a7527 100644
|
| --- a/src/gpu/gl/GrGLCaps.h
|
| +++ b/src/gpu/gl/GrGLCaps.h
|
| @@ -380,6 +380,19 @@ public:
|
| SK_DECLARE_INST_COUNT(GrGLSLCaps)
|
|
|
| /**
|
| + * Indicates how GLSL must interact with advanced blend equations. The KHR extension requires
|
| + * special layout qualifiers in the fragment shader.
|
| + */
|
| + enum AdvancedBlendEqnInteraction {
|
| + kNotSupported_AdvancedBlendEqnInteraction, //<! No advanced blend equation support
|
| + kAutomatic_AdvancedBlendEqnInteraction, //<! No interaction required
|
| + kMustEnable_AdvancedBlendEqnInteraction, //<! Blanket qualifier for all equations
|
| + kMustEnableSeparately_AdvancedBlendEqnInteraction, //<! Separate qualifiers per equation
|
| +
|
| + kLast_AdvancedBlendEqnInteraction = kMustEnableSeparately_AdvancedBlendEqnInteraction
|
| + };
|
| +
|
| + /**
|
| * Creates a GrGLSLCaps that advertises no support for any extensions,
|
| * formats, etc. Call init to initialize from a GrGLContextInfo.
|
| */
|
| @@ -399,7 +412,7 @@ public:
|
| * Initializes the GrGLSLCaps to the set of features supported in the current
|
| * OpenGL context accessible via ctxInfo.
|
| */
|
| - bool init(const GrGLContextInfo& ctxInfo, const GrGLInterface* glInterface);
|
| + bool init(const GrGLContextInfo&, const GrGLInterface*, const GrGLCaps&);
|
|
|
| /**
|
| * Some helper functions for encapsulating various extensions to read FB Buffer on openglES
|
| @@ -416,6 +429,14 @@ public:
|
|
|
| bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; }
|
|
|
| + AdvancedBlendEqnInteraction advancedBlendEqnInteraction() const {
|
| + return fAdvancedBlendEqnInteraction;
|
| + }
|
| +
|
| + bool mustEnableAdvancedBlendEquations() const {
|
| + return fAdvancedBlendEqnInteraction >= kMustEnable_AdvancedBlendEqnInteraction;
|
| + }
|
| +
|
| /**
|
| * Returns a string containing the caps info.
|
| */
|
| @@ -432,6 +453,8 @@ private:
|
| const char* fFBFetchColorName;
|
| const char* fFBFetchExtensionString;
|
|
|
| + AdvancedBlendEqnInteraction fAdvancedBlendEqnInteraction;
|
| +
|
| typedef GrShaderCaps INHERITED;
|
| };
|
|
|
|
|