regenerated SkSL files to fix CheckGeneratedFiles
Bug: skia:
Change-Id: Ieee602b9936e6a23ecd16b72b48093d534a085e6
Reviewed-on: https://skia-review.googlesource.com/60040
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp
index 53aa0d2..2498ffc 100644
--- a/src/gpu/effects/GrDitherEffect.cpp
+++ b/src/gpu/effects/GrDitherEffect.cpp
@@ -30,14 +30,15 @@
"0.066666666666666666;\n break;\n}\n@if (sk_Caps.integerSupport) {\n "
"uint x = uint(sk_FragCoord.x);\n uint y = uint(sk_FragCoord.y);\n uint m = "
"(((((y & 1) << 5 | (x & 1) << 4) | (y & 2) << 2) | (x & 2) << 1) | (y & 4) >> 1) "
- "| (x & 4) >> 2;\n value = float(float(half(m)) / 64.0) - 0.4921875;\n} else "
- "{\n half4 modValues = half4(mod(sk_FragCoord.xyxy, float4(half4(2.0, 2.0, 4.0, "
- "4.0))));\n half4 stepValues = half4(step(float4(modValues), float4(half4(1.0, "
- "1.0, 2.0, 2.0))));\n value = float(dot(stepValues, half4(0.5, 0.25, 0.125, "
- "0.0625))) - 0.46875;\n}\n%s = half4(clamp(float3(%s.xyz + value * range), 0.0, "
- "float(%s.w)), %s.w);\n",
- _outer.rangeType(), args.fOutputColor,
- args.fInputColor ? args.fInputColor : "half4(1)",
+ "| (x & 4) >> 2;\n value = float(float(half(m)) / 64.0) - 0.4",
+ _outer.rangeType());
+ fragBuilder->codeAppendf(
+ "921875;\n} else {\n half4 modValues = half4(mod(sk_FragCoord.xyxy, "
+ "float4(half4(2.0, 2.0, 4.0, 4.0))));\n half4 stepValues = "
+ "half4(step(float4(modValues), float4(half4(1.0, 1.0, 2.0, 2.0))));\n value = "
+ "float(dot(stepValues, half4(0.5, 0.25, 0.125, 0.0625))) - 0.46875;\n}\n%s = "
+ "half4(clamp(float3(%s.xyz + value * range), 0.0, float(%s.w)), %s.w);\n",
+ args.fOutputColor, args.fInputColor ? args.fInputColor : "half4(1)",
args.fInputColor ? args.fInputColor : "half4(1)",
args.fInputColor ? args.fInputColor : "half4(1)");
}
diff --git a/src/gpu/effects/GrEllipseEffect.cpp b/src/gpu/effects/GrEllipseEffect.cpp
index a79ec1c..8621c9a 100644
--- a/src/gpu/effects/GrEllipseEffect.cpp
+++ b/src/gpu/effects/GrEllipseEffect.cpp
@@ -38,18 +38,20 @@
"Z);\ngrad_dot = half(max(float(grad_dot), 0.0001));\nhalf approx_dist = "
"float(implicit) * inversesqrt(float(grad_dot));\n@if (useScale) {\n "
"approx_dist *= %s.x;\n}\nhalf alpha;\n@switch (%d) {\n case 0:\n alpha "
- "= half(float(approx_dist) > 0.0 ? 0.0 : 1.0);\n break;\n case 1:\n "
- " alpha = half(clamp(0.5 - float(approx_dist), 0.0, 1.0));\n break;\n "
- "case 2:\n alpha = half(float(approx_dist) > 0.0 ? 1.0 : 0.0);\n "
- "break;\n case 3:\n alpha = half(clamp(0.5 + float(approx_dist), 0.0, "
- "1.0));\n break;\n default:\n discard;\n}\n%s = %s * alpha;\n",
+ "= half(float(approx_dist) > 0.0 ? 0.0 : 1.",
prevRadii.fX, prevRadii.fY, (useScale ? "true" : "false"),
args.fUniformHandler->getUniformCStr(fEllipseVar),
fScaleVar.isValid() ? args.fUniformHandler->getUniformCStr(fScaleVar) : "half2(0)",
args.fUniformHandler->getUniformCStr(fEllipseVar),
fScaleVar.isValid() ? args.fUniformHandler->getUniformCStr(fScaleVar) : "half2(0)",
- _outer.edgeType(), args.fOutputColor,
- args.fInputColor ? args.fInputColor : "half4(1)");
+ _outer.edgeType());
+ fragBuilder->codeAppendf(
+ "0);\n break;\n case 1:\n alpha = half(clamp(0.5 - "
+ "float(approx_dist), 0.0, 1.0));\n break;\n case 2:\n alpha = "
+ "half(float(approx_dist) > 0.0 ? 1.0 : 0.0);\n break;\n case 3:\n "
+ "alpha = half(clamp(0.5 + float(approx_dist), 0.0, 1.0));\n break;\n "
+ "default:\n discard;\n}\n%s = %s * alpha;\n",
+ args.fOutputColor, args.fInputColor ? args.fInputColor : "half4(1)");
}
private: