aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/effects/GrAlphaThresholdFragmentProcessor.cpp6
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.cpp3
-rw-r--r--src/sksl/SkSLCPPCodeGenerator.cpp2
-rw-r--r--tests/SkSLFPTest.cpp2
4 files changed, 5 insertions, 8 deletions
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.cpp b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
index bfd237dbbc..96961cf6e5 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.cpp
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
@@ -39,10 +39,8 @@ public:
kFragment_GrShaderFlag, kFloat_GrSLType, kDefault_GrSLPrecision, "innerThreshold");
fOuterThresholdVar = args.fUniformHandler->addUniform(
kFragment_GrShaderFlag, kFloat_GrSLType, kDefault_GrSLPrecision, "outerThreshold");
- SkString sk_TransformedCoords2D_0 =
- fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
- SkString sk_TransformedCoords2D_1 =
- fragBuilder->ensureCoords2D(args.fTransformedCoords[1]);
+ SkString sk_TransformedCoords2D_0 = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
+ SkString sk_TransformedCoords2D_1 = fragBuilder->ensureCoords2D(args.fTransformedCoords[1]);
fragBuilder->codeAppendf(
"float4 _tmpVar1;float4 color = %stexture(%s, %s).%s%s;\nfloat4 mask_color = "
"texture(%s, %s).%s;\nif (mask_color.w < 0.5) {\n if (color.w > %s) {\n "
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 63f41a814d..ed2734b579 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -24,8 +24,7 @@ public:
const GrSimpleTextureEffect& _outer = args.fFp.cast<GrSimpleTextureEffect>();
(void)_outer;
fColorSpaceHelper.emitCode(args.fUniformHandler, _outer.colorXform().get());
- SkString sk_TransformedCoords2D_0 =
- fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
+ SkString sk_TransformedCoords2D_0 = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
fragBuilder->codeAppendf(
"float4 _tmpVar1;%s = %s * %stexture(%s, %s).%s%s;\n", args.fOutputColor,
args.fInputColor ? args.fInputColor : "float4(1)",
diff --git a/src/sksl/SkSLCPPCodeGenerator.cpp b/src/sksl/SkSLCPPCodeGenerator.cpp
index bc47ff0ce3..17bcf0d11f 100644
--- a/src/sksl/SkSLCPPCodeGenerator.cpp
+++ b/src/sksl/SkSLCPPCodeGenerator.cpp
@@ -95,7 +95,7 @@ void CPPCodeGenerator::writeIndexExpression(const IndexExpression& i) {
String name = "sk_TransformedCoords2D_" + to_string(index);
fFormatArgs.push_back(name + ".c_str()");
if (fWrittenTransformedCoords.find(index) == fWrittenTransformedCoords.end()) {
- fExtraEmitCodeCode += " SkSL::String " + name +
+ fExtraEmitCodeCode += " SkString " + name +
" = fragBuilder->ensureCoords2D(args.fTransformedCoords[" +
to_string(index) + "]);\n";
fWrittenTransformedCoords.insert(index);
diff --git a/tests/SkSLFPTest.cpp b/tests/SkSLFPTest.cpp
index 1f983b704f..c3f9468ca8 100644
--- a/tests/SkSLFPTest.cpp
+++ b/tests/SkSLFPTest.cpp
@@ -382,7 +382,7 @@ DEF_TEST(SkSLFPTransformedCoords, r) {
*SkSL::ShaderCapsFactory::Default(),
{},
{
- "SkSL::String sk_TransformedCoords2D_0 = "
+ "SkString sk_TransformedCoords2D_0 = "
"fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);",
"fragBuilder->codeAppendf(\"%s = float4(%s, %s);\\n\", args.fOutputColor, "
"sk_TransformedCoords2D_0.c_str(), sk_TransformedCoords2D_0.c_str());"