From c70817a8625f04ad527959cd4ab019c3d5c0c949 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Wed, 20 Dec 2017 09:10:26 -0700 Subject: [PATCH] Init executor in SetCtxOptionsFromCommonFlags Bug: skia: Change-Id: I45501b6e32ac593d5d69c98c1455d9bde01b239f Reviewed-on: https://skia-review.googlesource.com/87603 Commit-Queue: Chris Dalton Reviewed-by: Brian Osman --- tools/flags/SkCommonFlags.cpp | 9 +++------ tools/flags/SkCommonFlagsGpu.h | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/flags/SkCommonFlags.cpp b/tools/flags/SkCommonFlags.cpp index 62a3f144ef..cd1e47fb77 100644 --- a/tools/flags/SkCommonFlags.cpp +++ b/tools/flags/SkCommonFlags.cpp @@ -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 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 diff --git a/tools/flags/SkCommonFlagsGpu.h b/tools/flags/SkCommonFlagsGpu.h index 780a737391..ffaf2d437f 100644 --- a/tools/flags/SkCommonFlagsGpu.h +++ b/tools/flags/SkCommonFlagsGpu.h @@ -64,8 +64,6 @@ inline GpuPathRenderers CollectGpuPathRenderersFromFlags() { return gpuPathRenderers; } -class SkExecutor* GpuExecutorForTools(); - /** * Helper to set GrContextOptions from common GPU flags. */