|
SkThreadPool ~~> SkTaskGroup
SkTaskGroup is like SkThreadPool except the threads stay in
one global pool. Each SkTaskGroup itself is tiny (4 bytes)
and its wait() method applies only to tasks add()ed to that
instance, not the whole thread pool.
This means we don't need to bring up new thread pools when
tests themselves want to use multithreading (e.g. pathops,
quilt). We just create a new SkTaskGroup and wait for that
to complete. This should be more efficient, and allow us
to expand where we use threads to really latency sensitive
places. E.g. we can probably now use these in nanobench
for CPU .skp rendering.
Now that all threads are sharing the same pool, I think we
can remove most of the custom mechanism pathops tests use
to control threading. They'll just ride on the global pool
with all other tests now.
This (temporarily?) removes the GPU multithreading feature
from DM, which we don't use.
On my desktop, DM runs a little faster (57s -> 55s) in
Debug, and a lot faster in Release (36s -> 24s). The bots
show speedups of similar proportions, cutting more than a
minute off the N4/Release and Win7/Debug runtimes.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/9c7207b5dc71dc5a96a2eb107d401133333d5b6f
Committed: https://skia.googlesource.com/skia/+/406654be7a930b484159f5bca107d3b11d8a9ede
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+293 lines, -386 lines) |
Patch |
|
M |
dm/DM.cpp
|
View
|
1
2
3
4
|
4 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
dm/DMQuiltTask.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
dm/DMTask.h
|
View
|
|
3 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
dm/DMTask.cpp
|
View
|
|
2 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
|
M |
dm/DMTaskRunner.h
|
View
|
1
2
3
4
|
2 chunks |
+5 lines, -8 lines |
0 comments
|
Download
|
|
M |
dm/DMTaskRunner.cpp
|
View
|
1
2
3
4
|
1 chunk |
+7 lines, -11 lines |
0 comments
|
Download
|
|
M |
dm/DMTestTask.h
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
dm/DMTestTask.cpp
|
View
|
1
2
|
1 chunk |
+1 line, -7 lines |
0 comments
|
Download
|
|
M |
gyp/dm.gypi
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
gyp/pathops_skpclip.gyp
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
gyp/pathops_unittest.gyp
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
gyp/tools.gyp
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
gyp/utils.gypi
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
src/utils/SkRunnable.h
|
View
|
1
|
1 chunk |
+2 lines, -11 lines |
0 comments
|
Download
|
|
A |
src/utils/SkTaskGroup.h
|
View
|
1
2
3
4
|
1 chunk |
+36 lines, -0 lines |
0 comments
|
Download
|
|
A |
src/utils/SkTaskGroup.cpp
|
View
|
1
2
3
4
|
1 chunk |
+143 lines, -0 lines |
0 comments
|
Download
|
|
D |
src/utils/SkThreadPool.h
|
View
|
|
1 chunk |
+0 lines, -221 lines |
0 comments
|
Download
|
|
M |
tests/OnceTest.cpp
|
View
|
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsExtendedTest.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
tests/PathOpsExtendedTest.cpp
|
View
|
|
3 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsOpCubicThreadedTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsOpLoopThreadedTest.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsOpRectThreadedTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsQuadLineIntersectionThreadedTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsSimplifyDegenerateThreadedTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsSimplifyQuadThreadedTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsSimplifyRectThreadedTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsSimplifyTrianglesThreadedTest.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsSkpClipTest.cpp
|
View
|
1
2
3
|
14 chunks |
+15 lines, -29 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsThreadedCommon.h
|
View
|
|
1 chunk |
+1 line, -5 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsThreadedCommon.cpp
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
tests/PathOpsTightBoundsTest.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
tests/SkpSkGrTest.cpp
|
View
|
1
2
|
4 chunks |
+6 lines, -9 lines |
0 comments
|
Download
|
|
M |
tests/Test.h
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
tests/Test.cpp
|
View
|
1
2
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
|
M |
tests/skia_test.cpp
|
View
|
1
2
3
4
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
tools/flags/SkCommonFlags.h
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
tools/flags/SkCommonFlags.cpp
|
View
|
1
2
|
2 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
|
M |
tools/iOSShell.cpp
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
tools/skpdiff/SkDiffContext.cpp
|
View
|
|
6 chunks |
+6 lines, -11 lines |
0 comments
|
Download
|
|
M |
tools/skpdiff/skpdiff_main.cpp
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
Total messages: 18 (5 generated)
|