blob: 492ba706e8124565bb08358dc201f61996104a43 [file] [log] [blame]
caryclark@google.comcd4421d2012-03-01 19:16:31 +00001
2
caryclark@google.comd88e0892012-03-27 13:23:51 +00003#include "ShapeOps.h"
caryclark@google.com78e17132012-04-17 11:40:34 +00004#include "SkBitmap.h"
5#include <pthread.h>
caryclark@google.comcd4421d2012-03-01 19:16:31 +00006
caryclark@google.com198e0542012-03-30 18:47:02 +00007class SkCanvas;
8
9//extern int comparePaths(const SkPath& one, const SkPath& two);
caryclark@google.com1577e8f2012-05-22 17:01:14 +000010extern int comparePaths(const SkPath& one, const SkPath& two, SkBitmap& bitmap,
11 SkCanvas* canvas);
caryclark@google.comcd4421d2012-03-01 19:16:31 +000012extern void comparePathsTiny(const SkPath& one, const SkPath& two);
caryclark@google.com752b60e2012-03-22 21:11:17 +000013extern bool drawAsciiPaths(const SkPath& one, const SkPath& two,
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000014 bool drawPaths);
caryclark@google.com2e7f4c82012-03-20 21:11:59 +000015extern void showPath(const SkPath& path, const char* str = NULL);
caryclark@google.com198e0542012-03-30 18:47:02 +000016extern bool testSimplify(const SkPath& path, bool fill, SkPath& out,
17 SkBitmap& bitmap, SkCanvas* canvas = 0);
caryclark@google.com8dcf1142012-07-02 20:27:02 +000018extern bool testSimplifyx(const SkPath& path, SkPath& out,
19 SkBitmap& bitmap, SkCanvas* canvas = 0);
20extern bool testSimplifyx(const SkPath& path);
caryclark@google.com78e17132012-04-17 11:40:34 +000021
22struct State4 {
23 State4();
caryclark@google.com2ddff932012-08-07 21:25:27 +000024 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.com78e17132012-04-17 11:40:34 +000033 int a;
34 int b;
35 int c;
36 int d;
caryclark@google.com27c449a2012-07-27 18:26:38 +000037 int testsRun;
caryclark@google.com47580692012-07-23 12:14:49 +000038 char filename[256];
caryclark@google.com2ddff932012-08-07 21:25:27 +000039
caryclark@google.com78e17132012-04-17 11:40:34 +000040 SkCanvas* canvas;
41 SkBitmap bitmap;
42 bool abcIsATriangle;
43};
44
45void createThread(State4* statePtr, void* (*test)(void* ));
46void waitForCompletion(State4 threadState[], int& threadIndex);