diff options
-rw-r--r-- | gyp/most.gyp | 1 | ||||
-rw-r--r-- | gyp/pathops_unittest.gyp | 1 | ||||
-rw-r--r-- | src/pathops/SkPathOpsDebug.h | 7 | ||||
-rw-r--r-- | tests/PathOpsCubicIntersectionTest.cpp | 2 | ||||
-rw-r--r-- | tests/PathOpsQuadLineIntersectionThreadedTest.cpp | 3 | ||||
-rw-r--r-- | tests/Test.h | 3 |
6 files changed, 12 insertions, 5 deletions
diff --git a/gyp/most.gyp b/gyp/most.gyp index 319547e2fe..d32987f049 100644 --- a/gyp/most.gyp +++ b/gyp/most.gyp @@ -17,6 +17,7 @@ 'SampleApp.gyp:SampleApp', 'tests.gyp:tests', 'tools.gyp:tools', + 'pathops_unittest.gyp:*', ], 'conditions': [ ['skia_os == "android"', { diff --git a/gyp/pathops_unittest.gyp b/gyp/pathops_unittest.gyp index d3bb3bc862..17213899d2 100644 --- a/gyp/pathops_unittest.gyp +++ b/gyp/pathops_unittest.gyp @@ -7,6 +7,7 @@ { 'target_name': 'pathops_unittest', 'type': 'executable', + 'suppress_wildcard': '1', 'include_dirs' : [ '../include/pathops', '../src/core', diff --git a/src/pathops/SkPathOpsDebug.h b/src/pathops/SkPathOpsDebug.h index 53991bc642..a642af4c01 100644 --- a/src/pathops/SkPathOpsDebug.h +++ b/src/pathops/SkPathOpsDebug.h @@ -18,11 +18,14 @@ #define ONE_OFF_DEBUG 0 #define ONE_OFF_DEBUG_MATHEMATICA 0 -#ifdef SK_BUILD_FOR_WIN +#if defined(SK_BUILD_FOR_WIN) || defined(SK_BUILD_FOR_ANDROID) #define SK_RAND(seed) rand() - #define SK_SNPRINTF _snprintf #else #define SK_RAND(seed) rand_r(&seed) +#endif +#ifdef SK_BUILD_FOR_WIN + #define SK_SNPRINTF _snprintf +#else #define SK_SNPRINTF snprintf #endif diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp index 5a6a336a3f..be9781dde6 100644 --- a/tests/PathOpsCubicIntersectionTest.cpp +++ b/tests/PathOpsCubicIntersectionTest.cpp @@ -305,7 +305,7 @@ static void oneOffTests(skiatest::Reporter* reporter) { static void CubicIntersection_RandTest(skiatest::Reporter* reporter) { srand(0); const int tests = 10000000; -#ifndef SK_BUILD_FOR_WIN +#if !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_ANDROID) unsigned seed = 0; #endif for (int test = 0; test < tests; ++test) { diff --git a/tests/PathOpsQuadLineIntersectionThreadedTest.cpp b/tests/PathOpsQuadLineIntersectionThreadedTest.cpp index c74e9619d4..a931221345 100644 --- a/tests/PathOpsQuadLineIntersectionThreadedTest.cpp +++ b/tests/PathOpsQuadLineIntersectionThreadedTest.cpp @@ -81,7 +81,8 @@ static void testQuadLineIntersectMain(PathOpsThreadState* data) int by = state.fB >> 2; int cx = state.fC & 0x03; int cy = state.fC >> 2; - SkDQuad quad = {{{ax, ay}, {bx, by}, {cx, cy}}}; + SkDQuad quad = {{{(double) ax, (double) ay}, {(double) bx, (double) by}, + {(double) cx, (double) cy}}}; SkReduceOrder reducer; int order = reducer.reduce(quad, SkReduceOrder::kFill_Style); if (order < 3) { diff --git a/tests/Test.h b/tests/Test.h index f90edab1c1..bfb4d60761 100644 --- a/tests/Test.h +++ b/tests/Test.h @@ -11,6 +11,7 @@ #include "SkRefCnt.h" #include "SkString.h" #include "SkTRegistry.h" +#include "SkThread.h" class GrContextFactory; @@ -31,7 +32,7 @@ namespace skiatest { }; void resetReporting(); - void bumpTestCount() { ++fTestCount; } + void bumpTestCount() { sk_atomic_inc(&fTestCount); } int countTests() const { return fTestCount; } int countResults(Result r) { SkASSERT((unsigned)r <= kLastResult); |