If we swap its arguments, SkTaskGroup::batch() _is_ sk_parallel_for.
Why have two names if we can get away with one?
This kills off sk_parallel_for_thread_count(), which was only used to avoid forcing a deadlock in OncePtrTest on multicore machines in singlethreaded mode... a really niche use case. Instead just don't explicitly force a race.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1552093002
Review URL: https://codereview.chromium.org/1552093002
diff --git a/bench/SkGlyphCacheBench.cpp b/bench/SkGlyphCacheBench.cpp
index c99b572..2e0429f 100644
--- a/bench/SkGlyphCacheBench.cpp
+++ b/bench/SkGlyphCacheBench.cpp
@@ -95,7 +95,7 @@
sk_tool_utils::create_portable_typeface("sans-serif", SkTypeface::kItalic)};
for (int work = 0; work < loops; work++) {
- sk_parallel_for(16, [&](int threadIndex) {
+ SkTaskGroup().batch(16, [&](int threadIndex) {
SkPaint paint;
paint.setAntiAlias(true);
paint.setSubpixelText(true);