Index: src/gpu/glsl/GrGLSLCaps.h |
diff --git a/src/gpu/glsl/GrGLSLCaps.h b/src/gpu/glsl/GrGLSLCaps.h |
index 4d6f5806674621e7174b6f80ae2c46c1b50e3637..f93ef2766d18f376a0e65c1399ebf6151fbb4502 100755 |
--- a/src/gpu/glsl/GrGLSLCaps.h |
+++ b/src/gpu/glsl/GrGLSLCaps.h |
@@ -74,6 +74,14 @@ public: |
bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDSTransform; } |
+ // Returns the string of an extension that must be enabled in the shader to support |
+ // derivatives. If nullptr is returned then no extension needs to be enabled. Before calling |
+ // this function, the caller should check that shaderDerivativeSupport exists. |
+ const char* shaderDerivativeExtensionString() const { |
+ SkASSERT(this->shaderDerivativeSupport()); |
+ return fShaderDerivativeExtensionString; |
+ } |
+ |
GrGLSLGeneration generation() const { return fGLSLGeneration; } |
/** |
@@ -94,6 +102,8 @@ private: |
const char* fVersionDeclString; |
+ const char* fShaderDerivativeExtensionString; |
+ |
const char* fFBFetchColorName; |
const char* fFBFetchExtensionString; |