aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/PathBench.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-18 15:26:12 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-18 15:26:12 +0000
commitb95eaa8d0842a8bba97f0bc7e19cfd9172d09722 (patch)
treece79e8cf032bd82c29a84945faa6336168becf77 /bench/PathBench.cpp
parent872017694b29fd08256ac99e3221bcd0b8a3f32b (diff)
Altered arcTo's canonical points to (usually) be convex
https://codereview.appspot.com/6709051/ This will require rebaselining of: degeneratesegments, shadertext & shadertext2 git-svn-id: http://skia.googlecode.com/svn/trunk@5997 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/PathBench.cpp')
-rw-r--r--bench/PathBench.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/bench/PathBench.cpp b/bench/PathBench.cpp
index 4a69d5a540..3b3c52d0cb 100644
--- a/bench/PathBench.cpp
+++ b/bench/PathBench.cpp
@@ -672,6 +672,8 @@ private:
};
// Chrome creates its own round rects with each corner possibly being different
+// Note: PathTest::test_arb_round_rect_is_convex performs almost exactly
+// the same test (but with no drawing)
class ArbRoundRectBench : public SkBenchmark {
protected:
SkString fName;
@@ -727,8 +729,7 @@ protected:
add_corner_arc(path, r, xCorner, yCorner, 90);
add_corner_arc(path, r, xCorner, yCorner, 180);
- // TODO: re-enable once arcTo convexity issue is resolved
- //SkASSERT(path->isConvex());
+ SkASSERT(path->isConvex());
}
virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
@@ -741,6 +742,9 @@ protected:
paint.setAntiAlias(true);
SkScalar radius = rand.nextUScalar1() * 30;
+ if (radius < SK_Scalar1) {
+ continue;
+ }
r.fLeft = rand.nextUScalar1() * 300;
r.fTop = rand.nextUScalar1() * 300;
r.fRight = r.fLeft + 2 * radius;