DM: make GPU tasks multithreaded again. Big refactor.
The main meat of things is in SkThreadPool. We can now give SkThreadPool a
type for each thread to create and destroy on its local stack. It's TLS
without going through SkTLS.
I've split the DM tasks into CpuTasks that run on threads with no TLS, and
GpuTasks that run on threads with a thread local GrContextFactory.
The old CpuTask and GpuTask have been renamed to CpuGMTask and GpuGMTask.
Upshot: default run of out/Debug/dm goes from ~45 seconds to ~20 seconds.
BUG=skia:
R=bsalomon@google.com, mtklein@google.com, reed@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/179233005
git-svn-id: http://skia.googlecode.com/svn/trunk@13632 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/dm.gyp b/gyp/dm.gyp
index db50993..c96281a 100644
--- a/gyp/dm.gyp
+++ b/gyp/dm.gyp
@@ -29,9 +29,9 @@
'sources': [
'../dm/DM.cpp',
'../dm/DMBenchTask.cpp',
- '../dm/DMCpuTask.cpp',
+ '../dm/DMCpuGMTask.cpp',
'../dm/DMExpectationsTask.cpp',
- '../dm/DMGpuTask.cpp',
+ '../dm/DMGpuGMTask.cpp',
'../dm/DMPipeTask.cpp',
'../dm/DMReplayTask.cpp',
'../dm/DMReporter.cpp',
diff --git a/gyp/utils.gyp b/gyp/utils.gyp
index 3f6e5b5..0d6c2ac 100644
--- a/gyp/utils.gyp
+++ b/gyp/utils.gyp
@@ -30,7 +30,6 @@
'../include/utils/SkThreadPool.h',
'../src/utils/SkCondVar.cpp',
'../src/utils/SkCountdown.cpp',
- '../src/utils/SkThreadPool.cpp',
'../include/utils/SkBoundaryPatch.h',
'../include/utils/SkFrontBufferedStream.h',
@@ -227,6 +226,7 @@
'direct_dependent_settings': {
'include_dirs': [
'../include/utils',
+ '../src/utils',
],
},
},