aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-10 18:53:01 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-10 18:53:01 +0000
commite942bc329aadbdf6f7f67e35faab52536b964ed9 (patch)
tree18a7c676a003801f1a9817288ce19d72c31a2a70 /tests
parentb0f8b430de74a51f35dbfbff5284a04f8d70ec48 (diff)
fix a few pathops test bugs exposed on Mac and Linux
git-svn-id: http://skia.googlecode.com/svn/trunk@8601 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/PathOpsExtendedTest.cpp2
-rw-r--r--tests/PathOpsQuadReduceOrderTest.cpp2
-rw-r--r--tests/PathOpsSimplifyTest.cpp16
-rw-r--r--tests/PathOpsThreadedCommon.h5
4 files changed, 21 insertions, 4 deletions
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index cbf21b1ebd..bc3dbe2b9f 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -490,8 +490,6 @@ bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
const int maxThreadsAllocated = 64;
static int maxThreads = 1;
-SK_DECLARE_STATIC_MUTEX(gQueueMutex);
-
int initializeTests(const char* test) {
#ifdef SK_DEBUG
gDebugMaxWindSum = 4;
diff --git a/tests/PathOpsQuadReduceOrderTest.cpp b/tests/PathOpsQuadReduceOrderTest.cpp
index 8ee817b627..64f2069e24 100644
--- a/tests/PathOpsQuadReduceOrderTest.cpp
+++ b/tests/PathOpsQuadReduceOrderTest.cpp
@@ -62,7 +62,7 @@ static void standardTestCases(skiatest::Reporter* reporter) {
}
}
-void QuadReduceOrderTest(skiatest::Reporter* reporter) {
+static void QuadReduceOrderTest(skiatest::Reporter* reporter) {
oneOffTest(reporter);
standardTestCases(reporter);
}
diff --git a/tests/PathOpsSimplifyTest.cpp b/tests/PathOpsSimplifyTest.cpp
index c8537dc97c..0da8da267f 100644
--- a/tests/PathOpsSimplifyTest.cpp
+++ b/tests/PathOpsSimplifyTest.cpp
@@ -3571,9 +3571,25 @@ static void testQuad1(skiatest::Reporter* reporter) {
}
#endif
+static void testQuadralateral2(skiatest::Reporter* reporter) {
+ SkPath path;
+ path.moveTo(0, 0);
+ path.lineTo(2, 2);
+ path.lineTo(0, 3);
+ path.lineTo(3, 3);
+ path.close();
+ path.moveTo(2, 0);
+ path.lineTo(3, 0);
+ path.lineTo(0, 1);
+ path.lineTo(1, 2);
+ path.close();
+ testSimplify(reporter, path);
+}
+
static void (*firstTest)(skiatest::Reporter* ) = 0;
static TestDesc tests[] = {
+ TEST(testQuadralateral2),
TEST(testQuad1), // FIXME: fails, need to investigate
TEST(testCubic2),
TEST(testCubic1),
diff --git a/tests/PathOpsThreadedCommon.h b/tests/PathOpsThreadedCommon.h
index 7f57a7bbd5..410194f4f2 100644
--- a/tests/PathOpsThreadedCommon.h
+++ b/tests/PathOpsThreadedCommon.h
@@ -15,7 +15,10 @@
#define PATH_STR_SIZE 512
class PathOpsThreadedRunnable;
-class skiatest::Reporter;
+
+namespace skiatest {
+class Reporter;
+}
struct PathOpsThreadState {
unsigned char fA;