Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(545)

Unified Diff: src/gpu/glsl/GrGLSLCaps.cpp

Issue 1420033005: Create swizzle table inside of glsl caps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/glsl/GrGLSLCaps.h ('k') | src/gpu/glsl/GrGLSLTextureSampler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
+}
+
« no previous file with comments | « src/gpu/glsl/GrGLSLCaps.h ('k') | src/gpu/glsl/GrGLSLTextureSampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698