Reduce size of filter mask.
http://codereview.appspot.com/4965057/
Reduce the size of filter masks, fix HQ blur when clipped, and add tests.
git-svn-id: http://skia.googlecode.com/svn/trunk@2211 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index fb3310b..0678748 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -104,11 +104,20 @@
int main (int argc, char * const argv[]) {
SkAutoGraphics ag;
-
+
bool androidMode = false;
- for (int i = 1; i < argc; i++) {
- if (!strcmp(argv[i], "-android")) {
+ const char* matchStr = NULL;
+
+ char* const* stop = argv + argc;
+ for (++argv; argv < stop; ++argv) {
+ if (strcmp(*argv, "-android") == 0) {
androidMode = true;
+
+ } else if (strcmp(*argv, "--match") == 0) {
+ ++argv;
+ if (argv < stop && **argv) {
+ matchStr = *argv;
+ }
}
}
@@ -118,17 +127,24 @@
const int count = Iter::Count();
int index = 0;
- int successCount = 0;
+ int failCount = 0;
+ int skipCount = 0;
while ((test = iter.next()) != NULL) {
reporter.setIndexOfTotal(index, count);
- successCount += test->run();
+ if (NULL != matchStr && !strstr(test->getName(), matchStr)) {
+ ++skipCount;
+ } else {
+ if (!test->run()) {
+ ++failCount;
+ }
+ }
SkDELETE(test);
index += 1;
}
if (!androidMode) {
- SkDebugf("Finished %d tests, %d failures.\n", count,
- count - successCount);
+ SkDebugf("Finished %d tests, %d failures, %d skipped.\n",
+ count, failCount, skipCount);
}
- return (count == successCount) ? 0 : 1;
+ return (failCount == 0) ? 0 : 1;
}