aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/strokefill.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-10 18:00:10 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-01-10 18:00:10 +0000
commit69a9943b67cc52c24beac853c6f8865dcb197b85 (patch)
treea3e62e9bc4f71404ce044f09b484cc5fa5d9bc16 /gm/strokefill.cpp
parent63d73749fbe36491403ea521005fd298dc70a94c (diff)
add SkPath::cheapComputeDirection() plus unittests
git-svn-id: http://skia.googlecode.com/svn/trunk@2996 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/strokefill.cpp')
-rw-r--r--gm/strokefill.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gm/strokefill.cpp b/gm/strokefill.cpp
index 2e71a368e8..c71e3dafdf 100644
--- a/gm/strokefill.cpp
+++ b/gm/strokefill.cpp
@@ -43,9 +43,12 @@ static void test10(SkCanvas* canvas) {
path2.reset();
path2.addCircle(x + 240, y + 200, 50, SkPath::kCCW_Direction);
canvas->drawPath(path2, paint);
+ SkASSERT(path2.cheapIsDirection(SkPath::kCCW_Direction));
path2.reset();
+ SkASSERT(!path2.cheapComputeDirection(NULL));
path2.addCircle(x + 360, y + 200, 50, SkPath::kCW_Direction);
+ SkASSERT(path2.cheapIsDirection(SkPath::kCW_Direction));
canvas->drawPath(path2, paint);
}
@@ -117,8 +120,8 @@ protected:
}
virtual void onDraw(SkCanvas* canvas) {
- // test10(canvas);
- test_rev(canvas);
+ test10(canvas);
+ // test_rev(canvas);
}
private: