aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2018-04-23 21:14:42 -0600
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-24 15:23:06 +0000
commit6f5e77a08faf9d967eba8194811cbf2391092c23 (patch)
tree577ea1030e16bd68c47eaa5cd3c494785c7204e6 /bench
parentb97f28b90399c2571712401a30b0299d37b4b52e (diff)
ccpr: Cull extremely thin triangles
When triangles get too thin it's possible for FP round-off error to actually give us the wrong winding direction, causing rendering artifacts. This change also allows us to unblacklist ANGLE. Bug: skia:7805 Bug: skia:7820 Change-Id: Ibaa0f033eba625d720e3a594c4515d8264cc413d Reviewed-on: https://skia-review.googlesource.com/123262 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'bench')
-rw-r--r--bench/GrCCGeometryBench.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/bench/GrCCGeometryBench.cpp b/bench/GrCCGeometryBench.cpp
index 5e47df042c..0628644ab9 100644
--- a/bench/GrCCGeometryBench.cpp
+++ b/bench/GrCCGeometryBench.cpp
@@ -22,6 +22,7 @@ public:
fPoints[1].set(x1, y1);
fPoints[2].set(x2, y2);
fPoints[3].set(x3, y3);
+ fPoints[4].set(x0, y0); // Flat closing edge.
fName = "ccprgeometry";
switch (SkClassifyCubic(fPoints)) {
@@ -52,7 +53,7 @@ public:
fGeometry.beginContour(fPoints[0]);
for (int i = 0; i < kNumBaseLoops; ++i) {
fGeometry.cubicTo(fPoints);
- fGeometry.lineTo(fPoints[0]);
+ fGeometry.lineTo(fPoints+3);
}
fGeometry.endContour();
fGeometry.reset();
@@ -60,7 +61,7 @@ public:
}
private:
- SkPoint fPoints[4];
+ SkPoint fPoints[5];
SkString fName;
GrCCGeometry fGeometry{4*100*kNumBaseLoops, 2*100*kNumBaseLoops};