Index: src/gpu/glsl/GrGLSLCaps.cpp |
diff --git a/src/gpu/glsl/GrGLSLCaps.cpp b/src/gpu/glsl/GrGLSLCaps.cpp |
index 54d041e3a0ebafa5e19594cdbd9da3ba67d287c7..140cb11494753e28e0b3fea639124b2c551be5cc 100755 |
--- a/src/gpu/glsl/GrGLSLCaps.cpp |
+++ b/src/gpu/glsl/GrGLSLCaps.cpp |
@@ -8,6 +8,8 @@ |
#include "GrGLSLCaps.h" |
+#include "GrContextOptions.h" |
+ |
//////////////////////////////////////////////////////////////////////////////////////////// |
GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) { |
@@ -25,6 +27,9 @@ GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) { |
fFBFetchColorName = nullptr; |
fFBFetchExtensionString = nullptr; |
fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; |
+ |
+ fMustSwizzleInShader = false; |
+ memset(fConfigSwizzle, 0, sizeof(fConfigSwizzle)); |
} |
SkString GrGLSLCaps::dump() const { |
@@ -56,3 +61,9 @@ SkString GrGLSLCaps::dump() const { |
return r; |
} |
+void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { |
+ if (options.fUseShaderSwizzling) { |
+ fMustSwizzleInShader = true; |
+ } |
+} |
+ |