Reland "Add small offset to t in GrLinearGradientLayout."

This reverts commit 4a20dbeaf31a549c0ae857beb3b163962f9aa325.

Reason for revert: layout tests suppressed.

Original change's description:
> Revert "Add small offset to t in GrLinearGradientLayout."
> 
> This reverts commit 1a15723397a069c07705f8ed4f9f4c9a0c194816.
> 
> Reason for revert: causes two layout tests to "fail". Need to disable tests
> 
> Original change's description:
> > Add small offset to t in GrLinearGradientLayout.
> > 
> > This works around a varying interpolation issue when a hard stop occurs
> > a along a row or column of pixel centers.
> > 
> > Bug: chromium:938592
> > Change-Id: I4c239b2831c3e901cbbfa43f0a60a3d7fb0fef75
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200939
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> 
> TBR=bsalomon@google.com,michaelludwig@google.com
> 
> Change-Id: Iebe45929050b8ab1d07574518a1b3d9ac5147512
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:938592
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201655
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,michaelludwig@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:938592
Change-Id: I3020bbe2f2bddf5b933dac56f39d821681a1e070
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201617
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/gradients/GrLinearGradientLayout.cpp b/src/gpu/gradients/GrLinearGradientLayout.cpp
index 5750495..184a075 100644
--- a/src/gpu/gradients/GrLinearGradientLayout.cpp
+++ b/src/gpu/gradients/GrLinearGradientLayout.cpp
@@ -25,9 +25,10 @@
         auto gradientMatrix = _outer.gradientMatrix();
         (void)gradientMatrix;
         SkString sk_TransformedCoords2D_0 = fragBuilder->ensureCoords2D(args.fTransformedCoords[0]);
-        fragBuilder->codeAppendf("half t = half(%s.x);\n%s = half4(t, 1.0, 0.0, 0.0);\n",
-                                 sk_TransformedCoords2D_0.c_str(),
-                                 args.fOutputColor);
+        fragBuilder->codeAppendf(
+                "half t = half(%s.x) + 1.0000000000000001e-05;\n%s = half4(t, 1.0, 0.0, 0.0);\n",
+                sk_TransformedCoords2D_0.c_str(),
+                args.fOutputColor);
     }
 
 private:
diff --git a/src/gpu/gradients/GrLinearGradientLayout.fp b/src/gpu/gradients/GrLinearGradientLayout.fp
index d12ee6c..bd14431 100644
--- a/src/gpu/gradients/GrLinearGradientLayout.fp
+++ b/src/gpu/gradients/GrLinearGradientLayout.fp
@@ -12,7 +12,14 @@
 }
 
 void main() {
-    half t = half(sk_TransformedCoords2D[0].x);
+    // We add a tiny delta to t. When gradient stops are set up so that a hard stop in a vertically
+    // or horizontally oriented gradient falls exactly at a column or row of pixel centers we can
+    // we can get slightly different interpolated t values along the column/row. By adding the delta
+    // we will consistently get the color to the "right" of the stop. Of course if the hard stop
+    // falls at X.5 - delta then we still could get inconsistent results, but that is much less
+    // likely. crbug.com/938592
+    // If/when we add filtering of the gradient this can be removed.
+    half t = half(sk_TransformedCoords2D[0].x) + 0.00001;
     sk_OutColor = half4(t, 1, 0, 0); // y = 1 for always valid
 }