diff options
author | 2013-12-30 14:14:42 +0000 | |
---|---|---|
committer | 2013-12-30 14:14:42 +0000 | |
commit | a306d93cd73c3fc1d81479cbba98638f1e055385 (patch) | |
tree | 922c841e70a568b2e8a9b1231938c2a179edc327 /tests | |
parent | 4c9128664a4782ef40c5ccd856e87f9ed3b86172 (diff) |
remove Sk64 from public API, and start to remove usage internally
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/113823003
git-svn-id: http://skia.googlecode.com/svn/trunk@12840 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r-- | tests/BitmapCopyTest.cpp | 12 | ||||
-rw-r--r-- | tests/Sk64Test.cpp | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp index 7a1d9acd7c..455fc691e3 100644 --- a/tests/BitmapCopyTest.cpp +++ b/tests/BitmapCopyTest.cpp @@ -343,8 +343,8 @@ DEF_TEST(BitmapCopy, reporter) { SkBitmap tstSafeSize; tstSafeSize.setConfig(gPairs[i].fConfig, 100000000U, 100000000U); - Sk64 safeSize = tstSafeSize.getSafeSize64(); - if (safeSize.isNeg()) { + int64_t safeSize = tstSafeSize.computeSafeSize64(); + if (safeSize < 0) { SkString str; str.printf("getSafeSize64() negative: %s", getSkConfigName(tstSafeSize)); @@ -358,20 +358,20 @@ DEF_TEST(BitmapCopy, reporter) { case SkBitmap::kA8_Config: case SkBitmap::kIndex8_Config: - if (safeSize.as64() != 0x2386F26FC10000LL) { + if (safeSize != 0x2386F26FC10000LL) { sizeFail = true; } break; case SkBitmap::kRGB_565_Config: case SkBitmap::kARGB_4444_Config: - if (safeSize.as64() != 0x470DE4DF820000LL) { + if (safeSize != 0x470DE4DF820000LL) { sizeFail = true; } break; case SkBitmap::kARGB_8888_Config: - if (safeSize.as64() != 0x8E1BC9BF040000LL) { + if (safeSize != 0x8E1BC9BF040000LL) { sizeFail = true; } break; @@ -381,7 +381,7 @@ DEF_TEST(BitmapCopy, reporter) { } if (sizeFail) { SkString str; - str.printf("getSafeSize64() wrong size: %s", + str.printf("computeSafeSize64() wrong size: %s", getSkConfigName(tstSafeSize)); reporter->reportFailed(str); } diff --git a/tests/Sk64Test.cpp b/tests/Sk64Test.cpp index 1777d24d10..d668e5454d 100644 --- a/tests/Sk64Test.cpp +++ b/tests/Sk64Test.cpp @@ -7,6 +7,7 @@ #include "Test.h" #include "TestClassDef.h" +#include "Sk64.h" #include "SkRandom.h" #include <math.h> @@ -92,8 +93,8 @@ void Sk64::UnitTestWithReporter(void* reporterParam) { } for (i = 0; i < 1000; i++) { - rand.next64(&a); //a.fHi >>= 1; // avoid overflow - rand.next64(&b); //b.fHi >>= 1; // avoid overflow + a.set64(rand.next64()); + b.set64(rand.next64()); if (!(i & 3)) // want to explicitly test these cases { |