renderer: Start tile-worker threads asynchronously.
According to the sampling profiler, starting these threads take up
10% of the non-idle startup time on Win10 and Win8 (~5% on Win7).
Try starting these threads asynchronously instead.
To allow for this, turn Start() and Join() on base::SimpleThread into
non-virtual methods. Introduce BeforeStart() and BeforeJoin() virtual
methods so that tests can still do additional work as needed. Then,
introduce base::SimepleThread::StartAsync(), and use that for starting
the raster threads. Also introduce a BeforeRun() virtual method, so
that it is still possible to trigger some tasks after the thread has
been started and initialized asynchronously.
BUG=835316
Change-Id: I107c5cc5cf1dd579d2866a1feca6fd583b8f5577
Reviewed-on: https://chromium-review.googlesource.com/1015236
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#552344}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6928fde34e9a06b3079d0e5fcc4593bce2f466e1
2 files changed