path ops : remove countdown overkill
Review URL: https://codereview.chromium.org/13958005 git-svn-id: http://skia.googlecode.com/svn/trunk@8756 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
018f179efb
commit
9515f09b6c
@ -15,11 +15,10 @@ PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() {
|
||||
}
|
||||
|
||||
void PathOpsThreadedTestRunner::render() {
|
||||
fCountdown.reset(fRunnables.count());
|
||||
SkThreadPool pool(fNumThreads);
|
||||
for (int index = 0; index < fRunnables.count(); ++ index) {
|
||||
fThreadPool.add(fRunnables[index]);
|
||||
pool.add(fRunnables[index]);
|
||||
}
|
||||
fCountdown.wait();
|
||||
#ifdef SK_DEBUG
|
||||
gDebugMaxWindSum = SK_MaxS32;
|
||||
gDebugMaxWindValue = SK_MaxS32;
|
||||
|
@ -36,8 +36,6 @@ class PathOpsThreadedTestRunner {
|
||||
public:
|
||||
PathOpsThreadedTestRunner(skiatest::Reporter* reporter, int threadCount)
|
||||
: fNumThreads(threadCount)
|
||||
, fThreadPool(threadCount)
|
||||
, fCountdown(threadCount)
|
||||
, fReporter(reporter) {
|
||||
}
|
||||
|
||||
@ -48,8 +46,6 @@ public:
|
||||
public:
|
||||
int fNumThreads;
|
||||
SkTDArray<PathOpsThreadedRunnable*> fRunnables;
|
||||
SkThreadPool fThreadPool;
|
||||
SkCountdown fCountdown;
|
||||
skiatest::Reporter* fReporter;
|
||||
};
|
||||
|
||||
@ -63,7 +59,6 @@ public:
|
||||
fState.fD = d;
|
||||
fState.fReporter = runner->fReporter;
|
||||
fTestFun = testFun;
|
||||
fDone = &runner->fCountdown;
|
||||
}
|
||||
|
||||
virtual void run() SK_OVERRIDE {
|
||||
@ -72,13 +67,11 @@ public:
|
||||
char pathStr[PATH_STR_SIZE];
|
||||
fState.fPathStr = pathStr;
|
||||
(*fTestFun)(&fState);
|
||||
fDone->run();
|
||||
}
|
||||
|
||||
private:
|
||||
PathOpsThreadState fState;
|
||||
void (*fTestFun)(PathOpsThreadState*);
|
||||
SkRunnable* fDone;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user