aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-12-20 09:10:26 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-20 17:03:34 +0000
commitc70817a8625f04ad527959cd4ab019c3d5c0c949 (patch)
treed7ccc5722a5482fd6fb615c185c8e380a72e1583
parent56a24813a4f905aa26cb90c7f835549677ac6975 (diff)
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>
-rw-r--r--tools/flags/SkCommonFlags.cpp9
-rw-r--r--tools/flags/SkCommonFlagsGpu.h2
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<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
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.
*/