diff options
author | 2013-12-19 21:54:27 +0000 | |
---|---|---|
committer | 2013-12-19 21:54:27 +0000 | |
commit | d6a301e9adfe465cbaf682963b3bd43d7fcebedc (patch) | |
tree | 3943195e538f22e87b6126b181ddf474db02ce02 /tests/MathTest.cpp | |
parent | 3f2028e3e6edc06cda996b4ff59a4befae8798cd (diff) |
begin to remove SkLONGLONG and wean Skia off of Sk64
BUG=
R=caryclark@google.com
Review URL: https://codereview.chromium.org/99433009
git-svn-id: http://skia.googlecode.com/svn/trunk@12788 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/MathTest.cpp')
-rw-r--r-- | tests/MathTest.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp index 1b8954a361..3efbbcb9fc 100644 --- a/tests/MathTest.cpp +++ b/tests/MathTest.cpp @@ -188,7 +188,6 @@ static void test_blend(skiatest::Reporter* reporter) { } } -#if defined(SkLONGLONG) static int symmetric_fixmul(int a, int b) { int sa = SkExtractSign(a); int sb = SkExtractSign(b); @@ -196,19 +195,9 @@ static int symmetric_fixmul(int a, int b) { a = SkApplySign(a, sa); b = SkApplySign(b, sb); -#if 1 - int c = (int)(((SkLONGLONG)a * b) >> 16); - + int c = (int)(((int64_t)a * b) >> 16); return SkApplySign(c, sa ^ sb); -#else - SkLONGLONG ab = (SkLONGLONG)a * b; - if (sa ^ sb) { - ab = -ab; - } - return ab >> 16; -#endif } -#endif static void check_length(skiatest::Reporter* reporter, const SkPoint& p, SkScalar targetLen) { @@ -492,12 +481,11 @@ DEF_TEST(Math, reporter) { unittest_fastfloat(reporter); unittest_isfinite(reporter); -#ifdef SkLONGLONG for (i = 0; i < 10000; i++) { SkFixed numer = rand.nextS(); SkFixed denom = rand.nextS(); SkFixed result = SkFixedDiv(numer, denom); - SkLONGLONG check = ((SkLONGLONG)numer << 16) / denom; + int64_t check = ((int64_t)numer << 16) / denom; (void)SkCLZ(numer); (void)SkCLZ(denom); @@ -522,7 +510,6 @@ DEF_TEST(Math, reporter) { r2 = SkFixedSquare(numer); REPORTER_ASSERT(reporter, result == r2); } -#endif test_blend(reporter); |