Remove unused varying type param from GrGLSLShaderBuilder texture methods.
Change-Id: Icbe887266d201bc6d64555f0e793765bf641e4b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262230
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index 452768a..827eef7 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -69,8 +69,7 @@
void GrGLSLShaderBuilder::appendTextureLookup(SkString* out,
SamplerHandle samplerHandle,
- const char* coordName,
- GrSLType varyingType) const {
+ const char* coordName) const {
const char* sampler = fProgramBuilder->samplerVariable(samplerHandle);
out->appendf("sample(%s, %s)", sampler, coordName);
append_texture_swizzle(out, fProgramBuilder->samplerSwizzle(samplerHandle));
@@ -78,10 +77,9 @@
void GrGLSLShaderBuilder::appendTextureLookup(SamplerHandle samplerHandle,
const char* coordName,
- GrSLType varyingType,
GrGLSLColorSpaceXformHelper* colorXformHelper) {
SkString lookup;
- this->appendTextureLookup(&lookup, samplerHandle, coordName, varyingType);
+ this->appendTextureLookup(&lookup, samplerHandle, coordName);
this->appendColorGamutXform(lookup.c_str(), colorXformHelper);
}
@@ -90,14 +88,13 @@
SkBlendMode mode,
SamplerHandle samplerHandle,
const char* coordName,
- GrSLType varyingType,
GrGLSLColorSpaceXformHelper* colorXformHelper) {
if (!dst) {
dst = "half4(1)";
}
SkString lookup;
this->codeAppendf("%s(", GrGLSLBlend::BlendFuncName(mode));
- this->appendTextureLookup(&lookup, samplerHandle, coordName, varyingType);
+ this->appendTextureLookup(&lookup, samplerHandle, coordName);
this->appendColorGamutXform(lookup.c_str(), colorXformHelper);
this->codeAppendf(", %s)", dst);
}
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.h b/src/gpu/glsl/GrGLSLShaderBuilder.h
index 937a871..ee0a494 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.h
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.h
@@ -28,20 +28,15 @@
using SamplerHandle = GrGLSLUniformHandler::SamplerHandle;
- /** Appends a 2D texture sample with projection if necessary. coordType must either be Vec2f or
- Vec3f. The latter is interpreted as projective texture coords. The vec length and swizzle
+ /** Appends a 2D texture sample with projection if necessary. The vec length and swizzle
order of the result depends on the GrProcessor::TextureSampler associated with the
SamplerHandle.
*/
- void appendTextureLookup(SkString* out,
- SamplerHandle,
- const char* coordName,
- GrSLType coordType = kHalf2_GrSLType) const;
+ void appendTextureLookup(SkString* out, SamplerHandle, const char* coordName) const;
/** Version of above that appends the result to the shader code instead.*/
void appendTextureLookup(SamplerHandle,
const char* coordName,
- GrSLType coordType = kHalf2_GrSLType,
GrGLSLColorSpaceXformHelper* colorXformHelper = nullptr);
/** Does the work of appendTextureLookup and blends the result by dst, treating the texture
@@ -51,7 +46,6 @@
SkBlendMode,
SamplerHandle,
const char* coordName,
- GrSLType coordType = kHalf2_GrSLType,
GrGLSLColorSpaceXformHelper* colorXformHelper = nullptr);
/** Adds a helper function to facilitate color gamut transformation, and produces code that
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.cpp b/src/gpu/glsl/GrGLSLXferProcessor.cpp
index 2535a4b..6778d32 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.cpp
+++ b/src/gpu/glsl/GrGLSLXferProcessor.cpp
@@ -77,8 +77,7 @@
}
fragBuilder->codeAppendf("half4 %s = ", dstColor);
- fragBuilder->appendTextureLookup(args.fDstTextureSamplerHandle, "_dstTexCoord",
- kHalf2_GrSLType);
+ fragBuilder->appendTextureLookup(args.fDstTextureSamplerHandle, "_dstTexCoord");
fragBuilder->codeAppend(";");
} else {
needsLocalOutColor = args.fShaderCaps->requiresLocalOutputColorForFBFetch();