Init executor in SetCtxOptionsFromCommonFlags

Bug: skia:
Change-Id: I45501b6e32ac593d5d69c98c1455d9bde01b239f
Reviewed-on: https://skia-review.googlesource.com/87603
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
Chris Dalton 2017-12-20 09:10:26 -07:00 committed by Skia Commit-Bot
parent 56a24813a4
commit c70817a862
2 changed files with 3 additions and 8 deletions

View File

@ -147,16 +147,13 @@ DEFINE_string(pr, "default",
"[[~]all [~]default [~]dashline [~]nvpr [~]msaa [~]aaconvex "
"[~]aalinearizing [~]small [~]tess]");
SkExecutor* GpuExecutorForTools() {
void SetCtxOptionsFromCommonFlags(GrContextOptions* ctxOptions) {
static std::unique_ptr<SkExecutor> gGpuExecutor = (0 != FLAGS_gpuThreads)
? SkExecutor::MakeFIFOThreadPool(FLAGS_gpuThreads) : nullptr;
return gGpuExecutor.get();
}
void SetCtxOptionsFromCommonFlags(GrContextOptions* ctxOptions) {
ctxOptions->fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
ctxOptions->fExecutor = gGpuExecutor.get();
ctxOptions->fAllowPathMaskCaching = FLAGS_cachePathMasks;
ctxOptions->fSuppressGeometryShaders = FLAGS_noGS;
ctxOptions->fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
}
#endif

View File

@ -64,8 +64,6 @@ inline GpuPathRenderers CollectGpuPathRenderersFromFlags() {
return gpuPathRenderers;
}
class SkExecutor* GpuExecutorForTools();
/**
* Helper to set GrContextOptions from common GPU flags.
*/