diff options
author | bungeman <bungeman@google.com> | 2015-08-26 05:15:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-26 05:15:46 -0700 |
commit | 60e0fee6d4acff638ccc9670c4055aced529a7a0 (patch) | |
tree | 8f73b02cd0bfbb7d6d64982ed4ebd8776d4a5a28 /tests | |
parent | 8d624bd44ef9e6d4ab7b768c4cbaa41cba830eda (diff) |
Remove include of stdlib.h from SkTypes.h.
Unfortunately, immintrin.h (which is also included by SkTypes)
includes xmmintrin.h which includes mm_malloc.h which includes
stdlib.h for malloc even though, from the implementation, it is
difficult to see why.
Fortunately, arm_neon.h does not seem to be involved in such
shenanigans, so building for Android will keep things sane.
TBR=reed@google.com
Doesn't change Skia API, just moves an include.
Review URL: https://codereview.chromium.org/1313203003
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PathOpsAngleTest.cpp | 4 | ||||
-rw-r--r-- | tests/PathOpsCubicIntersectionTest.cpp | 2 | ||||
-rw-r--r-- | tests/PathOpsExtendedTest.cpp | 2 | ||||
-rw-r--r-- | tests/PathOpsQuadLineIntersectionThreadedTest.cpp | 2 | ||||
-rwxr-xr-x | tests/PathOpsSkpClipTest.cpp | 2 | ||||
-rw-r--r-- | tests/RTConfRegistryTest.cpp | 2 | ||||
-rw-r--r-- | tests/SortTest.cpp | 2 | ||||
-rw-r--r-- | tests/Time.cpp | 2 |
8 files changed, 14 insertions, 4 deletions
diff --git a/tests/PathOpsAngleTest.cpp b/tests/PathOpsAngleTest.cpp index 9f9c321a42..cec8dde68a 100644 --- a/tests/PathOpsAngleTest.cpp +++ b/tests/PathOpsAngleTest.cpp @@ -51,7 +51,7 @@ DEF_TEST(PathOpsAngleFindCrossEpsilon, reporter) { float p2 = SkDoubleToScalar(line[1].fY * test.fX); int p1Bits = SkFloatAs2sCompliment(p1); int p2Bits = SkFloatAs2sCompliment(p2); - int epsilon = abs(p1Bits - p2Bits); + int epsilon = SkTAbs(p1Bits - p2Bits); if (maxEpsilon < epsilon) { SkDebugf("line={{0, 0}, {%1.7g, %1.7g}} t=%1.7g pt={%1.7g, %1.7g}" " epsilon=%d\n", @@ -104,7 +104,7 @@ DEF_TEST(PathOpsAngleFindQuadEpsilon, reporter) { float p2 = SkDoubleToScalar(line[1].fY * last.fX); int p1Bits = SkFloatAs2sCompliment(p1); int p2Bits = SkFloatAs2sCompliment(p2); - int epsilon = abs(p1Bits - p2Bits); + int epsilon = SkTAbs(p1Bits - p2Bits); if (maxEpsilon < epsilon) { SkDebugf("line={{0, 0}, {%1.7g, %1.7g}} t=%1.7g/%1.7g/%1.7g moveT=%1.7g" " pt={%1.7g, %1.7g} epsilon=%d\n", diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp index 75a5cc3ef4..d45ec06d55 100644 --- a/tests/PathOpsCubicIntersectionTest.cpp +++ b/tests/PathOpsCubicIntersectionTest.cpp @@ -12,6 +12,8 @@ #include "SkReduceOrder.h" #include "Test.h" +#include <stdlib.h> + const int firstCubicIntersectionTest = 9; static void standardTestCases(skiatest::Reporter* reporter) { diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp index d458c41e97..1401290f83 100644 --- a/tests/PathOpsExtendedTest.cpp +++ b/tests/PathOpsExtendedTest.cpp @@ -16,6 +16,8 @@ #include "SkRTConf.h" #include "SkStream.h" +#include <stdlib.h> + #ifdef SK_BUILD_FOR_MAC #include <sys/sysctl.h> #endif diff --git a/tests/PathOpsQuadLineIntersectionThreadedTest.cpp b/tests/PathOpsQuadLineIntersectionThreadedTest.cpp index 7e33b7b374..a4f87dfea1 100644 --- a/tests/PathOpsQuadLineIntersectionThreadedTest.cpp +++ b/tests/PathOpsQuadLineIntersectionThreadedTest.cpp @@ -91,7 +91,7 @@ static void testQuadLineIntersectMain(PathOpsThreadState* data) SkDPoint xy = quad.ptAtT(tIndex / 4.0); for (int h = -2; h <= 2; ++h) { for (int v = -2; v <= 2; ++v) { - if (h == v && abs(h) != 1) { + if (h == v && SkTAbs(h) != 1) { continue; } double x = xy.fX; diff --git a/tests/PathOpsSkpClipTest.cpp b/tests/PathOpsSkpClipTest.cpp index 6f3d014a2f..95421fca30 100755 --- a/tests/PathOpsSkpClipTest.cpp +++ b/tests/PathOpsSkpClipTest.cpp @@ -32,6 +32,8 @@ #include "SkTemplates.h" #include "SkTime.h" +#include <stdlib.h> + __SK_FORCE_IMAGE_DECODER_LINKING; /* add local exceptions here */ diff --git a/tests/RTConfRegistryTest.cpp b/tests/RTConfRegistryTest.cpp index 59fb3e9142..84ce942bf6 100644 --- a/tests/RTConfRegistryTest.cpp +++ b/tests/RTConfRegistryTest.cpp @@ -8,6 +8,8 @@ #include "SkRTConf.h" #include "Test.h" +#include <stdlib.h> + // Friended proxy for SkRTConfRegistry::parse() template <typename T> bool test_rt_conf_parse(SkRTConfRegistry* reg, const char* key, T* value) { diff --git a/tests/SortTest.cpp b/tests/SortTest.cpp index e8713dd4d2..d544ebd665 100644 --- a/tests/SortTest.cpp +++ b/tests/SortTest.cpp @@ -9,6 +9,8 @@ #include "SkTSort.h" #include "Test.h" +#include <stdlib.h> + extern "C" { static int compare_int(const void* a, const void* b) { return *(const int*)a - *(const int*)b; diff --git a/tests/Time.cpp b/tests/Time.cpp index 60dcd5527c..cf4f80f9da 100644 --- a/tests/Time.cpp +++ b/tests/Time.cpp @@ -44,7 +44,7 @@ DEF_TEST(Time_GetDateTime, r) { // The westernmost timezone is -12:00. // The easternmost timezone is +14:00. - REPORTER_ASSERT(r, abs(SkToInt(dateTime.fTimeZoneMinutes)) <= 14 * 60); + REPORTER_ASSERT(r, SkTAbs(SkToInt(dateTime.fTimeZoneMinutes)) <= 14 * 60); SkString timeStamp; dateTime.toISO8601(&timeStamp); |