aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsAngleTest.cpp
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2015-08-26 05:15:46 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-26 05:15:46 -0700
commit60e0fee6d4acff638ccc9670c4055aced529a7a0 (patch)
tree8f73b02cd0bfbb7d6d64982ed4ebd8776d4a5a28 /tests/PathOpsAngleTest.cpp
parent8d624bd44ef9e6d4ab7b768c4cbaa41cba830eda (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/PathOpsAngleTest.cpp')
-rw-r--r--tests/PathOpsAngleTest.cpp4
1 files changed, 2 insertions, 2 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",