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:
parent
56a24813a4
commit
c70817a862
@ -147,16 +147,13 @@ DEFINE_string(pr, "default",
|
|||||||
"[[~]all [~]default [~]dashline [~]nvpr [~]msaa [~]aaconvex "
|
"[[~]all [~]default [~]dashline [~]nvpr [~]msaa [~]aaconvex "
|
||||||
"[~]aalinearizing [~]small [~]tess]");
|
"[~]aalinearizing [~]small [~]tess]");
|
||||||
|
|
||||||
SkExecutor* GpuExecutorForTools() {
|
void SetCtxOptionsFromCommonFlags(GrContextOptions* ctxOptions) {
|
||||||
static std::unique_ptr<SkExecutor> gGpuExecutor = (0 != FLAGS_gpuThreads)
|
static std::unique_ptr<SkExecutor> gGpuExecutor = (0 != FLAGS_gpuThreads)
|
||||||
? SkExecutor::MakeFIFOThreadPool(FLAGS_gpuThreads) : nullptr;
|
? SkExecutor::MakeFIFOThreadPool(FLAGS_gpuThreads) : nullptr;
|
||||||
return gGpuExecutor.get();
|
ctxOptions->fExecutor = gGpuExecutor.get();
|
||||||
}
|
|
||||||
|
|
||||||
void SetCtxOptionsFromCommonFlags(GrContextOptions* ctxOptions) {
|
|
||||||
ctxOptions->fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
|
||||||
ctxOptions->fAllowPathMaskCaching = FLAGS_cachePathMasks;
|
ctxOptions->fAllowPathMaskCaching = FLAGS_cachePathMasks;
|
||||||
ctxOptions->fSuppressGeometryShaders = FLAGS_noGS;
|
ctxOptions->fSuppressGeometryShaders = FLAGS_noGS;
|
||||||
|
ctxOptions->fGpuPathRenderers = CollectGpuPathRenderersFromFlags();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -64,8 +64,6 @@ inline GpuPathRenderers CollectGpuPathRenderersFromFlags() {
|
|||||||
return gpuPathRenderers;
|
return gpuPathRenderers;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SkExecutor* GpuExecutorForTools();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to set GrContextOptions from common GPU flags.
|
* Helper to set GrContextOptions from common GPU flags.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user