| Index: dm/DMTaskRunner.h
|
| diff --git a/dm/DMTaskRunner.h b/dm/DMTaskRunner.h
|
| index dd1440ed9accb50740ae56193b5045da7bf8582f..d147525380ed5086ade310cfbb8ec0fd14c5c4ca 100644
|
| --- a/dm/DMTaskRunner.h
|
| +++ b/dm/DMTaskRunner.h
|
| @@ -2,11 +2,12 @@
|
| #define DMTaskRunner_DEFINED
|
|
|
| #include "DMGpuSupport.h"
|
| -#include "SkThreadPool.h"
|
| +#include "SkTDArray.h"
|
| +#include "SkTaskGroup.h"
|
| #include "SkTypes.h"
|
|
|
| // TaskRunner runs Tasks on one of two threadpools depending on the need for a GrContextFactory.
|
| -// It's typically a good idea to run fewer GPU threads than CPU threads (go nuts with those).
|
| +// We fix the number of GPU threads to 1, but go nuts with CPU threads.
|
|
|
| namespace DM {
|
|
|
| @@ -15,16 +16,16 @@ class GpuTask;
|
|
|
| class TaskRunner : SkNoncopyable {
|
| public:
|
| - explicit TaskRunner(int cpuThreads, int gpuThreads);
|
| + // 0 -> one thread per core
|
| + explicit TaskRunner(int cpuThreads);
|
|
|
| void add(CpuTask* task);
|
| - void addNext(CpuTask* task);
|
| void add(GpuTask* task);
|
| void wait();
|
|
|
| private:
|
| - SkTThreadPool<void> fCpu;
|
| - SkTThreadPool<GrContextFactory> fGpu;
|
| + SkTaskGroup fCpuWork;
|
| + SkTDArray<GpuTask*> fGpuWork;
|
| };
|
|
|
| } // namespace DM
|
|
|