diff options
author | egdaniel <egdaniel@google.com> | 2015-11-03 08:15:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-03 08:15:29 -0800 |
commit | 4036674952f341dab0695c3b054fefa5bb8cdec1 (patch) | |
tree | 73629dadb61dff6ce5c730ce71e883b919a73027 /src/gpu/glsl/GrGLSLCaps.cpp | |
parent | 501b7344f116ccc821d437d324aa7883d7ce97bf (diff) |
Create swizzle table inside of glsl caps
BUG=skia:
Review URL: https://codereview.chromium.org/1420033005
Diffstat (limited to 'src/gpu/glsl/GrGLSLCaps.cpp')
-rwxr-xr-x | src/gpu/glsl/GrGLSLCaps.cpp | 11 |
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; + } +} + |