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 "
|
||||
"[~]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
|
||||
|
@ -64,8 +64,6 @@ inline GpuPathRenderers CollectGpuPathRenderersFromFlags() {
|
||||
return gpuPathRenderers;
|
||||
}
|
||||
|
||||
class SkExecutor* GpuExecutorForTools();
|
||||
|
||||
/**
|
||||
* Helper to set GrContextOptions from common GPU flags.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user