aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-autoroll <android-autoroll@skia-corp.google.com.iam.gserviceaccount.com>2020-04-27 15:50:26 +0000
committerDerek Sollenberger <djsollen@google.com>2020-04-27 16:38:13 +0000
commit46261462fc226f9e2b7ec10abadcffc813102522 (patch)
treee8faaebb207beb4cb69037aa09d02fa01284ee03
parente8302fb6aa5a9789914dc0c12adafa719a6d169c (diff)
parentcf8c53436c776c96b670c4f18cf42a7d2b53eb5b (diff)
downloadskia-46261462fc226f9e2b7ec10abadcffc813102522.tar.gz
Roll external/skia 7eb1d296c06b..cf8c53436c77 (1 commits)
https://skia.googlesource.com/skia.git/+log/7eb1d296c06b..cf8c53436c77 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://skia-autoroll.corp.goog/r/android-next-autoroll Please CC egdaniel@google.com,nifong@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md Test: Presubmit checks will test this change. Exempt-From-Owner-Approval: The autoroll bot does not require owner approval. Bug: 147686308 Merged-In: I36c0eb43dd1b65826478f3e3c285268b618175dd Change-Id: I68c33de98e667563f87e868becc8940ff8453e81
-rw-r--r--src/gpu/ops/GrAAConvexPathRenderer.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index d68ce5ff22..bb08cc47d3 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -472,24 +472,27 @@ static void create_vertices(const SegmentArray& segments,
color, skipUVs,
-segb.fNorms[0].dot(qpts[2]) + c0,
0.0f);
-
+ // We need a negative value that is very large that it won't effect results if it is
+ // interpolated with. However, the value can't be too large of a negative that it
+ // effects numerical precision on less powerful GPUs.
+ static const SkScalar kStableLargeNegativeValue = -SK_ScalarMax/1000000;
verts.write(qpts[0] + segb.fNorms[0],
color, skipUVs,
- -SK_ScalarMax/100,
- -SK_ScalarMax/100);
+ kStableLargeNegativeValue,
+ kStableLargeNegativeValue);
verts.write(qpts[2] + segb.fNorms[1],
color, skipUVs,
- -SK_ScalarMax/100,
- -SK_ScalarMax/100);
+ kStableLargeNegativeValue,
+ kStableLargeNegativeValue);
SkVector midVec = segb.fNorms[0] + segb.fNorms[1];
midVec.normalize();
verts.write(qpts[1] + midVec,
color, skipUVs,
- -SK_ScalarMax/100,
- -SK_ScalarMax/100);
+ kStableLargeNegativeValue,
+ kStableLargeNegativeValue);
GrPathUtils::QuadUVMatrix toUV(qpts);
toUV.apply(quadVertsBegin, 6, vertexStride, uvOffset);