Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Issue 179233005: DM: make GPU tasks multithreaded again. Big refactor. (Closed)

Created:
6 years, 9 months ago by mtklein_C
Modified:
6 years, 9 months ago
Reviewers:
bsalomon, mtklein, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

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: Committed: http://code.google.com/p/skia/source/detail?r=13632

Patch Set 1 #

Patch Set 2 : make count=0 safe again #

Patch Set 3 : nits #

Total comments: 5

Patch Set 4 : default 1 GPU thread #

Unified diffs Side-by-side diffs Delta from patch set Stats (+388 lines, -560 lines) Patch
M dm/DM.cpp View 1 2 3 5 chunks +19 lines, -13 lines 0 comments Download
M dm/DMBenchTask.h View 4 chunks +4 lines, -7 lines 0 comments Download
M dm/DMBenchTask.cpp View 4 chunks +5 lines, -5 lines 0 comments Download
A + dm/DMCpuGMTask.h View 3 chunks +10 lines, -11 lines 0 comments Download
A + dm/DMCpuGMTask.cpp View 1 2 4 chunks +10 lines, -10 lines 0 comments Download
D dm/DMCpuTask.h View 1 chunk +0 lines, -42 lines 0 comments Download
D dm/DMCpuTask.cpp View 1 chunk +0 lines, -60 lines 0 comments Download
M dm/DMExpectationsTask.h View 1 chunk +1 line, -2 lines 0 comments Download
M dm/DMExpectationsTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
A + dm/DMGpuGMTask.h View 3 chunks +13 lines, -14 lines 0 comments Download
A + dm/DMGpuGMTask.cpp View 4 chunks +12 lines, -12 lines 0 comments Download
D dm/DMGpuTask.h View 1 chunk +0 lines, -43 lines 0 comments Download
D dm/DMGpuTask.cpp View 1 chunk +0 lines, -56 lines 0 comments Download
M dm/DMPipeTask.h View 2 chunks +1 line, -2 lines 0 comments Download
M dm/DMPipeTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
M dm/DMReplayTask.h View 2 chunks +1 line, -2 lines 0 comments Download
M dm/DMReplayTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
M dm/DMSerializeTask.h View 2 chunks +1 line, -2 lines 0 comments Download
M dm/DMSerializeTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
M dm/DMTask.h View 1 2 2 chunks +33 lines, -22 lines 0 comments Download
M dm/DMTask.cpp View 1 2 1 chunk +33 lines, -27 lines 0 comments Download
M dm/DMTaskRunner.h View 1 2 1 chunk +9 lines, -10 lines 0 comments Download
M dm/DMTaskRunner.cpp View 1 2 1 chunk +8 lines, -37 lines 0 comments Download
M dm/DMTestTask.h View 1 chunk +31 lines, -18 lines 0 comments Download
M dm/DMTestTask.cpp View 2 chunks +25 lines, -11 lines 0 comments Download
M dm/DMTileGridTask.h View 2 chunks +1 line, -2 lines 0 comments Download
M dm/DMTileGridTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
M dm/DMWriteTask.h View 1 chunk +1 line, -2 lines 0 comments Download
M dm/DMWriteTask.cpp View 1 chunk +1 line, -1 line 0 comments Download
M gyp/dm.gyp View 1 chunk +2 lines, -2 lines 0 comments Download
M gyp/utils.gyp View 1 2 2 chunks +1 line, -1 line 0 comments Download
M include/utils/SkRunnable.h View 1 chunk +11 lines, -3 lines 0 comments Download
M include/utils/SkThreadPool.h View 1 2 3 chunks +150 lines, -11 lines 0 comments Download
D src/utils/SkThreadPool.cpp View 1 chunk +0 lines, -127 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
mtklein
6 years, 9 months ago (2014-02-27 22:38:03 UTC) #1
bsalomon
https://codereview.chromium.org/179233005/diff/40001/dm/DM.cpp File dm/DM.cpp (right): https://codereview.chromium.org/179233005/diff/40001/dm/DM.cpp#newcode31 dm/DM.cpp:31: DEFINE_int32(gpuThreads, 4, "Threads for GPU work."); I wonder if ...
6 years, 9 months ago (2014-02-28 16:40:49 UTC) #2
mtklein
https://codereview.chromium.org/179233005/diff/40001/dm/DM.cpp File dm/DM.cpp (right): https://codereview.chromium.org/179233005/diff/40001/dm/DM.cpp#newcode31 dm/DM.cpp:31: DEFINE_int32(gpuThreads, 4, "Threads for GPU work."); On 2014/02/28 16:40:49, ...
6 years, 9 months ago (2014-02-28 17:18:13 UTC) #3
bsalomon
https://codereview.chromium.org/179233005/diff/40001/dm/DMTask.h File dm/DMTask.h (right): https://codereview.chromium.org/179233005/diff/40001/dm/DMTask.h#newcode54 dm/DMTask.h:54: class GpuTask : public Task, public SkTRunnable<GrContextFactory> { On ...
6 years, 9 months ago (2014-02-28 18:45:37 UTC) #4
reed1
I do not feel strongly about the single/multiple inheritance pattern for tool-only code like this.
6 years, 9 months ago (2014-02-28 19:25:40 UTC) #5
bsalomon
On 2014/02/28 19:25:40, reed1 wrote: > I do not feel strongly about the single/multiple inheritance ...
6 years, 9 months ago (2014-02-28 19:28:25 UTC) #6
mtklein
On 2014/02/28 19:25:40, reed1 wrote: > I do not feel strongly about the single/multiple inheritance ...
6 years, 9 months ago (2014-02-28 19:44:12 UTC) #7
mtklein
The CQ bit was checked by mtklein@google.com
6 years, 9 months ago (2014-02-28 19:44:53 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/mtklein@chromium.org/179233005/50001
6 years, 9 months ago (2014-02-28 19:45:00 UTC) #9
commit-bot: I haz the power
6 years, 9 months ago (2014-02-28 20:31:59 UTC) #10
Message was sent while issue was closed.
Change committed as 13632

Powered by Google App Engine
This is Rietveld 408576698