aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-09-12 09:30:36 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-12 09:30:36 -0700
commit1a1aa9303484106a955e5549bf8ae24950f54e7a (patch)
tree512123db32ff1045b74f8ac2ef95d60bc4573a62 /src/gpu/effects
parenta316395e66095aa1bf495525e34c991688467a45 (diff)
Remove unneeded GrGLSLTransformedCoordsArray type
Rename GrGLSLFragmentBuilder::ensureFSCoords2D to ensureCoords2D and make it take an arbitrary GrShaderVar. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324663004 Review-Url: https://codereview.chromium.org/2324663004
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrBicubicEffect.cpp2
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.cpp4
-rw-r--r--src/gpu/effects/GrConvolutionEffect.cpp2
-rw-r--r--src/gpu/effects/GrMatrixConvolutionEffect.cpp2
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.cpp4
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp2
-rw-r--r--src/gpu/effects/GrYUVEffect.cpp15
7 files changed, 17 insertions, 14 deletions
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 54c536a2a2..86726c9058 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -75,7 +75,7 @@ void GrGLBicubicEffect::emitCode(EmitArgs& args) {
GrGLSLShaderVar("c3", kVec4f_GrSLType),
};
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
- SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 0);
+ SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
fragBuilder->emitFunction(kVec4f_GrSLType,
"cubicBlend",
SK_ARRAY_COUNT(gCubicBlendArgs),
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index aeb0393daf..4eb7a11c76 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -31,8 +31,8 @@ public:
fragBuilder->codeAppendf("%s;", tmpDecl.c_str());
fragBuilder->codeAppendf("%s = ", tmpVar.c_str());
- fragBuilder->appendTextureLookup(args.fTexSamplers[0], args.fCoords[0].c_str(),
- args.fCoords[0].getType());
+ fragBuilder->appendTextureLookup(args.fTexSamplers[0], args.fTransformedCoords[0].c_str(),
+ args.fTransformedCoords[0].getType());
fragBuilder->codeAppend(";");
if (GrConfigConversionEffect::kNone_PMConversion == pmConversion) {
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 2266c47eeb..59f7ab19e3 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -54,7 +54,7 @@ void GrGLConvolutionEffect::emitCode(EmitArgs& args) {
"Kernel", arrayCount);
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
- SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 0);
+ SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
fragBuilder->codeAppendf("%s = vec4(0, 0, 0, 0);", args.fOutputColor);
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 8f031904ca..a07b67128b 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -65,7 +65,7 @@ void GrGLMatrixConvolutionEffect::emitCode(EmitArgs& args) {
const char* bias = uniformHandler->getUniformCStr(fBiasUni);
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
- SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 0);
+ SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
fragBuilder->codeAppend("vec4 sum = vec4(0, 0, 0, 0);");
fragBuilder->codeAppendf("vec2 coord = %s - %s * %s;", coords2D.c_str(), kernelOffset, imgInc);
fragBuilder->codeAppend("vec4 c;");
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index b819cf3b81..6eb15e0c31 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -24,8 +24,8 @@ public:
fragBuilder->codeAppendf("%s = ", args.fOutputColor);
fragBuilder->appendTextureLookupAndModulate(args.fInputColor,
args.fTexSamplers[0],
- args.fCoords[0].c_str(),
- args.fCoords[0].getType(),
+ args.fTransformedCoords[0].c_str(),
+ args.fTransformedCoords[0].getType(),
&colorSpaceHelper);
fragBuilder->codeAppend(";");
}
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 814d193fde..e06c8de801 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -191,7 +191,7 @@ void GrGLTextureDomainEffect::emitCode(EmitArgs& args) {
const GrTextureDomain& domain = textureDomainEffect.textureDomain();
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
- SkString coords2D = fragBuilder->ensureFSCoords2D(args.fCoords, 0);
+ SkString coords2D = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
fGLDomain.sampleTexture(fragBuilder,
args.fUniformHandler,
args.fGLSLCaps,
diff --git a/src/gpu/effects/GrYUVEffect.cpp b/src/gpu/effects/GrYUVEffect.cpp
index 7f959306f4..5b04f21235 100644
--- a/src/gpu/effects/GrYUVEffect.cpp
+++ b/src/gpu/effects/GrYUVEffect.cpp
@@ -108,17 +108,20 @@ public:
kMat44f_GrSLType, kDefault_GrSLPrecision,
"ColorSpaceMatrix", &colorSpaceMatrix);
fragBuilder->codeAppendf("%s = vec4(", args.fOutputColor);
- fragBuilder->appendTextureLookup(args.fTexSamplers[0], args.fCoords[0].c_str(),
- args.fCoords[0].getType());
+ fragBuilder->appendTextureLookup(args.fTexSamplers[0],
+ args.fTransformedCoords[0].c_str(),
+ args.fTransformedCoords[0].getType());
fragBuilder->codeAppend(".r,");
- fragBuilder->appendTextureLookup(args.fTexSamplers[1], args.fCoords[1].c_str(),
- args.fCoords[1].getType());
+ fragBuilder->appendTextureLookup(args.fTexSamplers[1],
+ args.fTransformedCoords[1].c_str(),
+ args.fTransformedCoords[1].getType());
if (effect.fNV12) {
fragBuilder->codeAppendf(".rg,");
} else {
fragBuilder->codeAppend(".r,");
- fragBuilder->appendTextureLookup(args.fTexSamplers[2], args.fCoords[2].c_str(),
- args.fCoords[2].getType());
+ fragBuilder->appendTextureLookup(args.fTexSamplers[2],
+ args.fTransformedCoords[2].c_str(),
+ args.fTransformedCoords[2].getType());
fragBuilder->codeAppendf(".g,");
}
fragBuilder->codeAppendf("1.0) * %s;", colorSpaceMatrix);