diff options
-rw-r--r-- | bench/nanobench.cpp | 37 | ||||
-rw-r--r-- | dm/DM.cpp | 19 | ||||
-rw-r--r-- | dm/DMGpuGMTask.cpp | 6 | ||||
-rw-r--r-- | dm/DMGpuGMTask.h | 4 | ||||
-rw-r--r-- | dm/DMGpuSupport.h | 10 | ||||
-rw-r--r-- | gm/gmmain.cpp | 9 | ||||
-rw-r--r-- | gyp/common_conditions.gypi | 2 | ||||
-rw-r--r-- | gyp/common_variables.gypi | 4 | ||||
-rwxr-xr-x | src/gpu/GrDistanceFieldTextContext.cpp | 2 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 14 | ||||
-rw-r--r-- | src/gpu/SkGpuDevice.h | 6 | ||||
-rw-r--r-- | src/image/SkSurface_Gpu.cpp | 2 | ||||
-rw-r--r-- | tools/PictureRenderer.cpp | 4 | ||||
-rw-r--r-- | tools/PictureRenderer.h | 10 | ||||
-rw-r--r-- | tools/PictureRenderingFlags.cpp | 8 | ||||
-rw-r--r-- | tools/flags/SkCommonFlags.cpp | 2 |
16 files changed, 91 insertions, 48 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index aade590541..1f5ae60f82 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -283,8 +283,10 @@ struct Config { int samples; #if SK_SUPPORT_GPU GrContextFactory::GLContextType ctxType; + bool useDFText; #else int bogusInt; + bool bogusBool; #endif }; @@ -327,10 +329,11 @@ static bool is_gpu_config_allowed(const char* name, GrContextFactory::GLContextT // Append all configs that are enabled and supported. static void create_configs(SkTDArray<Config>* configs) { - #define CPU_CONFIG(name, backend, color, alpha) \ - if (is_cpu_config_allowed(#name)) { \ - Config config = { #name, Benchmark::backend, color, alpha, 0, kBogusGLContextType }; \ - configs->push(config); \ + #define CPU_CONFIG(name, backend, color, alpha) \ + if (is_cpu_config_allowed(#name)) { \ + Config config = { #name, Benchmark::backend, color, alpha, 0, \ + kBogusGLContextType, false }; \ + configs->push(config); \ } if (FLAGS_cpu) { @@ -340,7 +343,7 @@ static void create_configs(SkTDArray<Config>* configs) { } #if SK_SUPPORT_GPU - #define GPU_CONFIG(name, ctxType, samples) \ + #define GPU_CONFIG(name, ctxType, samples, useDFText) \ if (is_gpu_config_allowed(#name, GrContextFactory::ctxType, samples)) { \ Config config = { \ #name, \ @@ -348,20 +351,22 @@ static void create_configs(SkTDArray<Config>* configs) { kN32_SkColorType, \ kPremul_SkAlphaType, \ samples, \ - GrContextFactory::ctxType }; \ + GrContextFactory::ctxType, \ + useDFText }; \ configs->push(config); \ } if (FLAGS_gpu) { - GPU_CONFIG(gpu, kNative_GLContextType, 0) - GPU_CONFIG(msaa4, kNative_GLContextType, 4) - GPU_CONFIG(msaa16, kNative_GLContextType, 16) - GPU_CONFIG(nvprmsaa4, kNVPR_GLContextType, 4) - GPU_CONFIG(nvprmsaa16, kNVPR_GLContextType, 16) - GPU_CONFIG(debug, kDebug_GLContextType, 0) - GPU_CONFIG(nullgpu, kNull_GLContextType, 0) + GPU_CONFIG(gpu, kNative_GLContextType, 0, false) + GPU_CONFIG(msaa4, kNative_GLContextType, 4, false) + GPU_CONFIG(msaa16, kNative_GLContextType, 16, false) + GPU_CONFIG(nvprmsaa4, kNVPR_GLContextType, 4, false) + GPU_CONFIG(nvprmsaa16, kNVPR_GLContextType, 16, false) + GPU_CONFIG(gpudft, kNative_GLContextType, 0, true) + GPU_CONFIG(debug, kDebug_GLContextType, 0, false) + GPU_CONFIG(nullgpu, kNull_GLContextType, 0, false) #ifdef SK_ANGLE - GPU_CONFIG(angle, kANGLE_GLContextType, 0) + GPU_CONFIG(angle, kANGLE_GLContextType, 0, false) #endif } #endif @@ -383,8 +388,10 @@ static Target* is_enabled(Benchmark* bench, const Config& config) { } #if SK_SUPPORT_GPU else if (Benchmark::kGPU_Backend == config.backend) { + uint32_t flags = config.useDFText ? SkSurfaceProps::kUseDistanceFieldFonts_Flag : 0; + SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); target->surface.reset(SkSurface::NewRenderTarget(gGrFactory->get(config.ctxType), info, - config.samples)); + config.samples, &props)); target->gl = gGrFactory->getGLContext(config.ctxType); } #endif @@ -86,18 +86,19 @@ static void kick_off_gms(const SkTDArray<GMRegistry::Factory>& gms, START("565", CpuGMTask, kRGB_565_SkColorType); START("8888", CpuGMTask, kN32_SkColorType); - START("gpu", GpuGMTask, native, gpuAPI, 0); - START("msaa4", GpuGMTask, native, gpuAPI, 4); - START("msaa16", GpuGMTask, native, gpuAPI, 16); - START("nvprmsaa4", GpuGMTask, nvpr, gpuAPI, 4); - START("nvprmsaa16", GpuGMTask, nvpr, gpuAPI, 16); - START("gpunull", GpuGMTask, null, gpuAPI, 0); - START("gpudebug", GpuGMTask, debug, gpuAPI, 0); + START("gpu", GpuGMTask, native, gpuAPI, 0, false); + START("msaa4", GpuGMTask, native, gpuAPI, 4, false); + START("msaa16", GpuGMTask, native, gpuAPI, 16, false); + START("nvprmsaa4", GpuGMTask, nvpr, gpuAPI, 4, false); + START("nvprmsaa16", GpuGMTask, nvpr, gpuAPI, 16, false); + START("gpudft", GpuGMTask, native, gpuAPI, 0, true); + START("gpunull", GpuGMTask, null, gpuAPI, 0, false); + START("gpudebug", GpuGMTask, debug, gpuAPI, 0, false); #if SK_ANGLE - START("angle", GpuGMTask, angle, gpuAPI, 0); + START("angle", GpuGMTask, angle, gpuAPI, 0, false); #endif #if SK_MESA - START("mesa", GpuGMTask, mesa, gpuAPI, 0); + START("mesa", GpuGMTask, mesa, gpuAPI, 0, false); #endif START("pdf", PDFTask, RASTERIZE_PDF_PROC); } diff --git a/dm/DMGpuGMTask.cpp b/dm/DMGpuGMTask.cpp index 2890483f55..9347ebdfe9 100644 --- a/dm/DMGpuGMTask.cpp +++ b/dm/DMGpuGMTask.cpp @@ -13,13 +13,15 @@ GpuGMTask::GpuGMTask(const char* config, skiagm::GMRegistry::Factory gmFactory, GrContextFactory::GLContextType contextType, GrGLStandard gpuAPI, - int sampleCount) + int sampleCount, + bool useDFText) : GpuTask(reporter, taskRunner) , fGM(gmFactory(NULL)) , fName(UnderJoin(fGM->getName(), config)) , fContextType(contextType) , fGpuAPI(gpuAPI) , fSampleCount(sampleCount) + , fUseDFText(useDFText) {} static bool gAlreadyWarned[GrContextFactory::kGLContextTypeCnt][kGrGLStandardCnt]; @@ -30,7 +32,7 @@ void GpuGMTask::draw(GrContextFactory* grFactory) { kN32_SkColorType, kPremul_SkAlphaType); SkAutoTUnref<SkSurface> surface(NewGpuSurface(grFactory, fContextType, fGpuAPI, info, - fSampleCount)); + fSampleCount, fUseDFText)); if (!surface) { if (!gAlreadyWarned[fContextType][fGpuAPI]) { SkDebugf("FYI: couldn't create GPU context, type %d API %d. Will skip.\n", diff --git a/dm/DMGpuGMTask.h b/dm/DMGpuGMTask.h index 23f3a45b0c..553436d040 100644 --- a/dm/DMGpuGMTask.h +++ b/dm/DMGpuGMTask.h @@ -22,7 +22,8 @@ public: skiagm::GMRegistry::Factory, GrContextFactory::GLContextType, GrGLStandard gpuAPI, - int sampleCount); + int sampleCount, + bool useDFText); virtual void draw(GrContextFactory*) SK_OVERRIDE; virtual bool shouldSkip() const SK_OVERRIDE; @@ -34,6 +35,7 @@ private: const GrContextFactory::GLContextType fContextType; GrGLStandard fGpuAPI; const int fSampleCount; + const bool fUseDFText; }; } // namespace DM diff --git a/dm/DMGpuSupport.h b/dm/DMGpuSupport.h index 90b0ea55cf..33d8995b44 100644 --- a/dm/DMGpuSupport.h +++ b/dm/DMGpuSupport.h @@ -21,8 +21,11 @@ static inline SkSurface* NewGpuSurface(GrContextFactory* grFactory, GrContextFactory::GLContextType type, GrGLStandard gpuAPI, SkImageInfo info, - int samples) { - return SkSurface::NewRenderTarget(grFactory->get(type, gpuAPI), info, samples, NULL); + int samples, + bool useDFText) { + uint32_t flags = useDFText ? SkSurfaceProps::kUseDistanceFieldFonts_Flag : 0; + SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); + return SkSurface::NewRenderTarget(grFactory->get(type, gpuAPI), info, samples, &props); } } // namespace DM @@ -62,7 +65,8 @@ static inline SkSurface* NewGpuSurface(GrContextFactory*, GrContextFactory::GLContextType, GrGLStandard, SkImageInfo, - int) { + int, + bool) { return NULL; } diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp index cd3f03a599..606b7f75a7 100644 --- a/gm/gmmain.cpp +++ b/gm/gmmain.cpp @@ -151,6 +151,9 @@ enum ConfigFlags { /* Read reference GM images if a read path is provided. */ kRead_ConfigFlag = 0x2, kRW_ConfigFlag = (kWrite_ConfigFlag | kRead_ConfigFlag), + /* Use distance fields for rendering text */ + kDFText_ConfigFlag = 0x4, + kRWDFT_ConfigFlag = (kRW_ConfigFlag | kDFText_ConfigFlag), }; struct ConfigData { @@ -584,7 +587,10 @@ public: } #if SK_SUPPORT_GPU else { // GPU - surface.reset(SkSurface::NewRenderTargetDirect(gpuTarget->asRenderTarget())); + uint32_t flags = (gRec.fFlags & kDFText_ConfigFlag) ? + SkSurfaceProps::kUseDistanceFieldFonts_Flag : 0; + SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); + surface.reset(SkSurface::NewRenderTargetDirect(gpuTarget->asRenderTarget(), &props)); if (deferred) { canvas.reset(SkDeferredCanvas::Create(surface)); } else { @@ -1291,6 +1297,7 @@ static const ConfigData gRec[] = { { kN32_SkColorType, kGPU_Backend, GrContextFactory::kNative_GLContextType, 4, kRW_ConfigFlag, "msaa4", false}, { kN32_SkColorType, kGPU_Backend, GrContextFactory::kNVPR_GLContextType, 4, kRW_ConfigFlag, "nvprmsaa4", true }, { kN32_SkColorType, kGPU_Backend, GrContextFactory::kNVPR_GLContextType, 16, kRW_ConfigFlag, "nvprmsaa16", false}, + { kN32_SkColorType, kGPU_Backend, GrContextFactory::kNative_GLContextType, 0, kRWDFT_ConfigFlag, "gpudft", true }, /* The gpudebug context does not generate meaningful images, so don't record * the images it generates! We only run it to look for asserts. */ { kN32_SkColorType, kGPU_Backend, GrContextFactory::kDebug_GLContextType, 0, kNone_ConfigFlag, "gpudebug", kDebugOnly}, diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi index d9c048771e..dd701dda82 100644 --- a/gyp/common_conditions.gypi +++ b/gyp/common_conditions.gypi @@ -5,7 +5,7 @@ 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)', 'SK_SUPPORT_GPU=<(skia_gpu)', 'SK_SUPPORT_OPENCL=<(skia_opencl)', - 'SK_FORCE_DISTANCEFIELD_FONTS=<(skia_force_distancefield_fonts)', + 'SK_FORCE_DISTANCE_FIELD_TEXT=<(skia_force_distance_field_text)', ], 'conditions' : [ ['skia_pic', { diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi index ab25eeff43..09d84ec399 100644 --- a/gyp/common_variables.gypi +++ b/gyp/common_variables.gypi @@ -152,7 +152,7 @@ 'skia_win_debuggers_path%': '', 'skia_shared_lib%': 0, 'skia_opencl%': 0, - 'skia_force_distancefield_fonts%': 0, + 'skia_force_distance_field_text%': 0, # These variables determine the default optimization level for different # compilers. @@ -231,7 +231,7 @@ 'skia_profile_enabled%': '<(skia_profile_enabled)', 'skia_shared_lib%': '<(skia_shared_lib)', 'skia_opencl%': '<(skia_opencl)', - 'skia_force_distancefield_fonts%': '<(skia_force_distancefield_fonts)', + 'skia_force_distance_field_text%': '<(skia_force_distance_field_text)', 'skia_static_initializers%': '<(skia_static_initializers)', 'ios_sdk_version%': '6.0', 'skia_win_debuggers_path%': '<(skia_win_debuggers_path)', diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp index 1976cf16a3..58c8121cd9 100755 --- a/src/gpu/GrDistanceFieldTextContext.cpp +++ b/src/gpu/GrDistanceFieldTextContext.cpp @@ -64,7 +64,7 @@ GrDistanceFieldTextContext::GrDistanceFieldTextContext(GrContext* context, const SkDeviceProperties& properties, bool enable) : GrTextContext(context, properties) { -#if SK_FORCE_DISTANCEFIELD_FONTS +#if SK_FORCE_DISTANCE_FIELD_TEXT fEnableDFRendering = true; #else fEnableDFRendering = enable; diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index da81c696d2..96c071473c 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -67,7 +67,7 @@ enum { kDefaultImageFilterCacheSize = 32 * 1024 * 1024 }; #define DO_DEFERRED_CLEAR() \ do { \ - if (fNeedClear) { \ + if (fFlags & kNeedClear_Flag) { \ this->clear(SK_ColorTRANSPARENT); \ } \ } while (false) \ @@ -137,7 +137,7 @@ SkGpuDevice::SkGpuDevice(GrSurface* surface, const SkSurfaceProps& props, unsign fContext = SkRef(surface->getContext()); - fNeedClear = flags & kNeedClear_Flag; + fFlags = flags; fRenderTarget = SkRef(surface->asRenderTarget()); @@ -148,8 +148,8 @@ SkGpuDevice::SkGpuDevice(GrSurface* surface, const SkSurfaceProps& props, unsign this->setPixelGeometry(props.pixelGeometry()); - bool useDFFonts = !!(flags & kDFFonts_Flag); - fTextContext = fContext->createTextContext(fRenderTarget, this->getLeakyProperties(), useDFFonts); + bool useDFT = SkToBool(flags & kDFText_Flag); + fTextContext = fContext->createTextContext(fRenderTarget, this->getLeakyProperties(), useDFT); } SkGpuDevice* SkGpuDevice::Create(GrContext* context, const SkImageInfo& origInfo, @@ -310,7 +310,7 @@ void SkGpuDevice::clear(SkColor color) { GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::clear", fContext); SkIRect rect = SkIRect::MakeWH(this->width(), this->height()); fContext->clear(&rect, SkColor2GrColor(color), true, fRenderTarget); - fNeedClear = false; + fFlags &= ~kNeedClear_Flag; } void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) { @@ -1473,7 +1473,7 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device, // clear of the source device must occur before CHECK_SHOULD_DRAW GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice::drawDevice", fContext); SkGpuDevice* dev = static_cast<SkGpuDevice*>(device); - if (dev->fNeedClear) { + if (dev->fFlags & kNeedClear_Flag) { // TODO: could check here whether we really need to draw at all dev->clear(0x0); } @@ -1763,6 +1763,8 @@ SkBaseDevice* SkGpuDevice::onCreateDevice(const SkImageInfo& info, Usage usage) SkAutoTUnref<GrTexture> texture; // Skia's convention is to only clear a device if it is non-opaque. unsigned flags = info.isOpaque() ? 0 : kNeedClear_Flag; + // If we're using distance field text, enable in the new device + flags |= (fFlags & kDFText_Flag) ? kDFText_Flag : 0; #if CACHE_COMPATIBLE_DEVICE_TEXTURES // layers are never draw in repeat modes, so we can request an approx diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h index 6a68eeb33e..6bba97434a 100644 --- a/src/gpu/SkGpuDevice.h +++ b/src/gpu/SkGpuDevice.h @@ -34,7 +34,7 @@ class SK_API SkGpuDevice : public SkBaseDevice { public: enum Flags { kNeedClear_Flag = 1 << 0, //!< Surface requires an initial clear - kDFFonts_Flag = 1 << 1, //!< Surface should render fonts using signed distance fields + kDFText_Flag = 1 << 1, //!< Surface should render text using signed distance fields }; /** @@ -136,8 +136,8 @@ private: GrTextContext* fTextContext; // state for our render-target - GrRenderTarget* fRenderTarget; - bool fNeedClear; + GrRenderTarget* fRenderTarget; + uint32_t fFlags; // remove when our clients don't rely on accessBitmap() SkBitmap fLegacyBitmap; diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp index 3e1eb9452b..1555c9a7a8 100644 --- a/src/image/SkSurface_Gpu.cpp +++ b/src/image/SkSurface_Gpu.cpp @@ -39,7 +39,7 @@ SkSurface_Gpu::SkSurface_Gpu(GrRenderTarget* renderTarget, const SkSurfaceProps* bool doClear) : INHERITED(renderTarget->width(), renderTarget->height(), props) { int deviceFlags = 0; - deviceFlags |= this->props().isUseDistanceFieldFonts() ? SkGpuDevice::kDFFonts_Flag : 0; + deviceFlags |= this->props().isUseDistanceFieldFonts() ? SkGpuDevice::kDFText_Flag : 0; fDevice = SkGpuDevice::Create(renderTarget, this->props(), deviceFlags); if (kRGB_565_GrPixelConfig != renderTarget->config() && doClear) { diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp index e4a69986db..1c31e6865a 100644 --- a/tools/PictureRenderer.cpp +++ b/tools/PictureRenderer.cpp @@ -161,8 +161,10 @@ SkCanvas* PictureRenderer::setupCanvas(int width, int height) { return NULL; } + uint32_t flags = fUseDFText ? SkGpuDevice::kDFText_Flag : 0; SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(target, - SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType))); + SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_InitType), + flags)); canvas = SkNEW_ARGS(SkCanvas, (device.get())); break; } diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h index e82eb7fb8a..c8462d9f03 100644 --- a/tools/PictureRenderer.h +++ b/tools/PictureRenderer.h @@ -220,6 +220,10 @@ public: void setSampleCount(int sampleCount) { fSampleCount = sampleCount; } + + void setUseDFText(bool useDFText) { + fUseDFText = useDFText; + } #endif void setDrawFilters(DrawFilterFlags const * const filters, const SkString& configName) { @@ -274,6 +278,8 @@ public: case kGPU_DeviceType: if (fSampleCount) { config.appendf("_msaa%d", fSampleCount); + } else if (fUseDFText) { + config.append("_gpudft"); } else { config.append("_gpu"); } @@ -325,6 +331,8 @@ public: tmp = "msaa"; tmp.appendS32(fSampleCount); result["config"] = tmp.c_str(); + } else if (fUseDFText) { + result["config"] = "gpudft"; } else { result["config"] = "gpu"; } @@ -428,6 +436,7 @@ public: , fGrContextFactory(opts) , fGrContext(NULL) , fSampleCount(0) + , fUseDFText(false) #endif { fGridInfo.fMargin.setEmpty(); @@ -495,6 +504,7 @@ private: GrContextFactory fGrContextFactory; GrContext* fGrContext; int fSampleCount; + bool fUseDFText; #endif virtual SkString getConfigNameInternal() = 0; diff --git a/tools/PictureRenderingFlags.cpp b/tools/PictureRenderingFlags.cpp index d78229acce..ac72cad4c2 100644 --- a/tools/PictureRenderingFlags.cpp +++ b/tools/PictureRenderingFlags.cpp @@ -28,7 +28,7 @@ DEFINE_string(bbh, "none", "bbhType [width height]: Set the bounding box hierarc #if SK_SUPPORT_GPU static const char kGpuAPINameGL[] = "gl"; static const char kGpuAPINameGLES[] = "gles"; -#define GPU_CONFIG_STRING "|gpu|msaa4|msaa16|nvprmsaa4|nvprmsaa16" +#define GPU_CONFIG_STRING "|gpu|msaa4|msaa16|nvprmsaa4|nvprmsaa16|gpudft" #else #define GPU_CONFIG_STRING "" #endif @@ -286,6 +286,7 @@ sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool) { } int sampleCount = 0; + bool useDFText = false; #endif if (FLAGS_config.count() > 0) { if (0 == strcmp(FLAGS_config[0], "8888")) { @@ -311,6 +312,10 @@ sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool) { deviceType = sk_tools::PictureRenderer::kNVPR_DeviceType; sampleCount = 16; } + else if (0 == strcmp(FLAGS_config[0], "gpudft")) { + deviceType = sk_tools::PictureRenderer::kGPU_DeviceType; + useDFText = true; + } #if SK_ANGLE else if (0 == strcmp(FLAGS_config[0], "angle")) { deviceType = sk_tools::PictureRenderer::kAngle_DeviceType; @@ -336,6 +341,7 @@ sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool) { } #if SK_SUPPORT_GPU renderer->setSampleCount(sampleCount); + renderer->setUseDFText(useDFText); #endif } diff --git a/tools/flags/SkCommonFlags.cpp b/tools/flags/SkCommonFlags.cpp index 4d329c5f30..c7fc17f047 100644 --- a/tools/flags/SkCommonFlags.cpp +++ b/tools/flags/SkCommonFlags.cpp @@ -9,7 +9,7 @@ DEFINE_string(config, "565 8888 pdf gpu nonrendering angle nvprmsaa4", "Options: 565 8888 pdf gpu nonrendering msaa4 msaa16 nvprmsaa4 nvprmsaa16 " - "gpunull gpudebug angle mesa"); + "gpudft gpunull gpudebug angle mesa"); DEFINE_bool(cpu, true, "master switch for running CPU-bound work."); |