aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-11-16 14:52:01 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2009-11-16 14:52:01 +0000
commite72fee513a5f903d6aa17066d2f3b79ac31f05de (patch)
tree486b749a7e46e13cc5f087b75b7d073b05fd5bdf /tests
parentf0f4e9abba62a405b7a41e40fcee20b45eb348ee (diff)
add onSendClickToChildren to views, so a view can capture all clicks.
speedup some of the unittests that were too slow minor cleanup in SkScan_Path, in prep for larger changes git-svn-id: http://skia.googlecode.com/svn/trunk@426 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/MathTest.cpp8
-rw-r--r--tests/PackBitsTest.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index dddd2da310..09e3748860 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -235,7 +235,7 @@ static void TestMath(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, clamp == clamp2);
}
- for (i = 0; i < 100000; i++) {
+ for (i = 0; i < 10000; i++) {
SkPoint p;
p.setLength(rand.nextS(), rand.nextS(), SK_Scalar1);
@@ -256,7 +256,7 @@ static void TestMath(skiatest::Reporter* reporter) {
#endif
#ifdef SkLONGLONG
- for (i = 0; i < 100000; i++) {
+ for (i = 0; i < 10000; i++) {
SkFixed numer = rand.nextS();
SkFixed denom = rand.nextS();
SkFixed result = SkFixedDiv(numer, denom);
@@ -321,7 +321,7 @@ static void TestMath(skiatest::Reporter* reporter) {
#endif
#ifdef SK_CAN_USE_FLOAT
- for (i = 0; i < 100000; i++) {
+ for (i = 0; i < 10000; i++) {
SkFract x = rand.nextU() >> 1;
double xx = (double)x / SK_Fract1;
SkFract xr = SkFractSqrt(x);
@@ -351,7 +351,7 @@ static void TestMath(skiatest::Reporter* reporter) {
}
int maxDiff = 0;
- for (i = 0; i < 10000; i++) {
+ for (i = 0; i < 1000; i++) {
SkFixed rads = rand.nextS() >> 10;
double frads = SkFixedToFloat(rads);
diff --git a/tests/PackBitsTest.cpp b/tests/PackBitsTest.cpp
index 729467e343..a22590c397 100644
--- a/tests/PackBitsTest.cpp
+++ b/tests/PackBitsTest.cpp
@@ -90,7 +90,7 @@ static void test_pack8(skiatest::Reporter* reporter) {
}
for (size_t size = 1; size <= 512; size += 1) {
- for (int n = 200; n; n--) {
+ for (int n = 100; n; n--) {
uint8_t src[600], src2[600];
uint8_t dst[600];
rand_fill(src, size);
@@ -104,7 +104,7 @@ static void test_pack8(skiatest::Reporter* reporter) {
bool match = memcmp(src, src2, size * sizeof(uint8_t)) == 0;
REPORTER_ASSERT(reporter, match);
- for (int j = 0; j < 200; j++) {
+ for (int j = 0; j < 100; j++) {
size_t skip = gRand.nextU() % size;
size_t write = gRand.nextU() % size;
if (skip + write > size) {