caryclark@google.com | cd4421d | 2012-03-01 19:16:31 +0000 | [diff] [blame] | 1 | |
| 2 | |
caryclark@google.com | d88e089 | 2012-03-27 13:23:51 +0000 | [diff] [blame] | 3 | #include "ShapeOps.h" |
caryclark@google.com | 78e1713 | 2012-04-17 11:40:34 +0000 | [diff] [blame] | 4 | #include "SkBitmap.h" |
| 5 | #include <pthread.h> |
caryclark@google.com | cd4421d | 2012-03-01 19:16:31 +0000 | [diff] [blame] | 6 | |
caryclark@google.com | 198e054 | 2012-03-30 18:47:02 +0000 | [diff] [blame] | 7 | class SkCanvas; |
| 8 | |
| 9 | //extern int comparePaths(const SkPath& one, const SkPath& two); |
caryclark@google.com | 1577e8f | 2012-05-22 17:01:14 +0000 | [diff] [blame] | 10 | extern int comparePaths(const SkPath& one, const SkPath& two, SkBitmap& bitmap, |
| 11 | SkCanvas* canvas); |
caryclark@google.com | cd4421d | 2012-03-01 19:16:31 +0000 | [diff] [blame] | 12 | extern void comparePathsTiny(const SkPath& one, const SkPath& two); |
caryclark@google.com | 752b60e | 2012-03-22 21:11:17 +0000 | [diff] [blame] | 13 | extern bool drawAsciiPaths(const SkPath& one, const SkPath& two, |
caryclark@google.com | 2e7f4c8 | 2012-03-20 21:11:59 +0000 | [diff] [blame] | 14 | bool drawPaths); |
caryclark@google.com | 2e7f4c8 | 2012-03-20 21:11:59 +0000 | [diff] [blame] | 15 | extern void showPath(const SkPath& path, const char* str = NULL); |
caryclark@google.com | 198e054 | 2012-03-30 18:47:02 +0000 | [diff] [blame] | 16 | extern bool testSimplify(const SkPath& path, bool fill, SkPath& out, |
| 17 | SkBitmap& bitmap, SkCanvas* canvas = 0); |
caryclark@google.com | 8dcf114 | 2012-07-02 20:27:02 +0000 | [diff] [blame] | 18 | extern bool testSimplifyx(const SkPath& path, SkPath& out, |
| 19 | SkBitmap& bitmap, SkCanvas* canvas = 0); |
| 20 | extern bool testSimplifyx(const SkPath& path); |
caryclark@google.com | 78e1713 | 2012-04-17 11:40:34 +0000 | [diff] [blame] | 21 | |
| 22 | struct State4 { |
| 23 | State4(); |
caryclark@google.com | 2ddff93 | 2012-08-07 21:25:27 +0000 | [diff] [blame^] | 24 | static pthread_mutex_t addQueue; |
| 25 | static pthread_cond_t checkQueue; |
| 26 | pthread_cond_t initialized; |
| 27 | static State4* queue; |
| 28 | State4* next; |
| 29 | pthread_t threadID; |
| 30 | int index; |
| 31 | bool done; |
| 32 | bool last; |
caryclark@google.com | 78e1713 | 2012-04-17 11:40:34 +0000 | [diff] [blame] | 33 | int a; |
| 34 | int b; |
| 35 | int c; |
| 36 | int d; |
caryclark@google.com | 27c449a | 2012-07-27 18:26:38 +0000 | [diff] [blame] | 37 | int testsRun; |
caryclark@google.com | 4758069 | 2012-07-23 12:14:49 +0000 | [diff] [blame] | 38 | char filename[256]; |
caryclark@google.com | 2ddff93 | 2012-08-07 21:25:27 +0000 | [diff] [blame^] | 39 | |
caryclark@google.com | 78e1713 | 2012-04-17 11:40:34 +0000 | [diff] [blame] | 40 | SkCanvas* canvas; |
| 41 | SkBitmap bitmap; |
| 42 | bool abcIsATriangle; |
| 43 | }; |
| 44 | |
| 45 | void createThread(State4* statePtr, void* (*test)(void* )); |
| 46 | void waitForCompletion(State4 threadState[], int& threadIndex); |