aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLUniformHandler.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-24 14:52:02 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-24 14:52:11 +0000
commitfe8da17f5333a0134a01b9fe4d7f67e3df949c61 (patch)
treebcffa405e17967214abcc9efcf75ede8d9cff689 /src/gpu/glsl/GrGLSLUniformHandler.h
parent3a08c65b9612dd845623f0e880fd68b3be75fceb (diff)
Revert "Revert "converted vertex shaders to device coords""
This reverts commit 29b3434e48ca41672266ac40f5b9e8f8a0405cb5. Reason for revert: The Chrome perf regression is suspect & the Nexus 5 is broken w/o this CL. Original change's description: > Revert "converted vertex shaders to device coords" > > This reverts commit e7e81c15c144b8133f696d0744ed9f7e8d06e936. > > Reason for revert: Chrome perf regressions > > Bug: skia: > Change-Id: I17fadc97c4b8e80bfdccbf123554614a00c58473 > Reviewed-on: https://skia-review.googlesource.com/99040 > Reviewed-by: Ethan Nicholas <ethannicholas@google.com> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com> TBR=csmartdalton@google.com,ethannicholas@google.com Change-Id: Iff3c9fce65beeca16028ae59d4d08b1413b90530 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/99241 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLUniformHandler.h')
-rw-r--r--src/gpu/glsl/GrGLSLUniformHandler.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gpu/glsl/GrGLSLUniformHandler.h b/src/gpu/glsl/GrGLSLUniformHandler.h
index e1511c2578..662486eebe 100644
--- a/src/gpu/glsl/GrGLSLUniformHandler.h
+++ b/src/gpu/glsl/GrGLSLUniformHandler.h
@@ -12,6 +12,9 @@
#include "GrShaderVar.h"
#include "GrSwizzle.h"
+// variable names beginning with this prefix will not be mangled
+#define GR_NO_MANGLE_PREFIX "sk_"
+
class GrGLSLProgramBuilder;
class GrGLSLUniformHandler {
@@ -51,7 +54,8 @@ public:
int arrayCount,
const char** outName = nullptr) {
SkASSERT(!GrSLTypeIsCombinedSamplerType(type));
- return this->internalAddUniformArray(visibility, type, precision, name, true, arrayCount,
+ bool mangle = strncmp(name, GR_NO_MANGLE_PREFIX, strlen(GR_NO_MANGLE_PREFIX));
+ return this->internalAddUniformArray(visibility, type, precision, name, mangle, arrayCount,
outName);
}
@@ -61,7 +65,8 @@ public:
int arrayCount,
const char** outName = nullptr) {
SkASSERT(!GrSLTypeIsCombinedSamplerType(type));
- return this->internalAddUniformArray(visibility, type, kDefault_GrSLPrecision, name, true,
+ bool mangle = strncmp(name, GR_NO_MANGLE_PREFIX, strlen(GR_NO_MANGLE_PREFIX));
+ return this->internalAddUniformArray(visibility, type, kDefault_GrSLPrecision, name, mangle,
arrayCount, outName);
}