aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2018-01-23 16:39:42 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 22:23:30 +0000
commit29b3434e48ca41672266ac40f5b9e8f8a0405cb5 (patch)
tree2524748fc90c30ae887e6a086e6bb76ffaa05e81 /src/gpu/gl
parent8524c30a971cd22fe1e3e0fd3db5988fe23272b6 (diff)
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>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLUniformHandler.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gpu/gl/GrGLUniformHandler.cpp b/src/gpu/gl/GrGLUniformHandler.cpp
index 39392f996b..b3b4b9f6b5 100644
--- a/src/gpu/gl/GrGLUniformHandler.cpp
+++ b/src/gpu/gl/GrGLUniformHandler.cpp
@@ -10,19 +10,10 @@
#include "gl/GrGLCaps.h"
#include "gl/GrGLGpu.h"
#include "gl/builders/GrGLProgramBuilder.h"
-#include "SkSLCompiler.h"
#define GL_CALL(X) GR_GL_CALL(this->glGpu()->glInterface(), X)
#define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->glGpu()->glInterface(), R, X)
-bool valid_name(const char* name) {
- // disallow unknown names that start with "sk_"
- if (!strncmp(name, GR_NO_MANGLE_PREFIX, strlen(GR_NO_MANGLE_PREFIX))) {
- return !strcmp(name, SkSL::Compiler::RTADJUST_NAME);
- }
- return true;
-}
-
GrGLSLUniformHandler::UniformHandle GrGLUniformHandler::internalAddUniformArray(
uint32_t visibility,
GrSLType type,
@@ -32,7 +23,6 @@ GrGLSLUniformHandler::UniformHandle GrGLUniformHandler::internalAddUniformArray(
int arrayCount,
const char** outName) {
SkASSERT(name && strlen(name));
- SkASSERT(valid_name(name));
SkASSERT(0 != visibility);
SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeTemporarilyAcceptsPrecision(type));
@@ -46,7 +36,7 @@ GrGLSLUniformHandler::UniformHandle GrGLUniformHandler::internalAddUniformArray(
// uniform view matrix, they should upload the view matrix in their setData along with regular
// uniforms.
char prefix = 'u';
- if ('u' == name[0] || !strncmp(name, GR_NO_MANGLE_PREFIX, strlen(GR_NO_MANGLE_PREFIX))) {
+ if ('u' == name[0]) {
prefix = '\0';
}
fProgramBuilder->nameVariable(uni.fVariable.accessName(), prefix, name, mangleName);