aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLCaps.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-11-03 08:15:28 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-03 08:15:29 -0800
commit4036674952f341dab0695c3b054fefa5bb8cdec1 (patch)
tree73629dadb61dff6ce5c730ce71e883b919a73027 /src/gpu/glsl/GrGLSLCaps.cpp
parent501b7344f116ccc821d437d324aa7883d7ce97bf (diff)
Create swizzle table inside of glsl caps
Diffstat (limited to 'src/gpu/glsl/GrGLSLCaps.cpp')
-rwxr-xr-xsrc/gpu/glsl/GrGLSLCaps.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpu/glsl/GrGLSLCaps.cpp b/src/gpu/glsl/GrGLSLCaps.cpp
index 54d041e3a0..140cb11494 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;
+ }
+}
+