aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-08-29 16:15:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-29 20:41:01 +0000
commitb350ae24d5356ac094982aee2f45c90216db35db (patch)
treebe744c46ec713ef6bbbe805b9c55d60273db1401 /src
parent1d8c42eb903b66035ecf4d45b03dfeb1ad07b957 (diff)
Add GrContextOption to disable distance field path renderer
We're going to hide the path renderer bitfield behind a testing-only flag, but clients may want to suppress this path renderer in particular, so a dedicated flag makes sense. Bug: skia: Change-Id: I6cc4049243b5d3c129a824dfe7c1a65a70a05ccd Reviewed-on: https://skia-review.googlesource.com/40083 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 8714b20da7..907f82c51b 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -197,6 +197,9 @@ bool GrContext::init(const GrContextOptions& options) {
GrPathRendererChain::Options prcOptions;
prcOptions.fAllowPathMaskCaching = options.fAllowPathMaskCaching;
prcOptions.fGpuPathRenderers = options.fGpuPathRenderers;
+ if (options.fDisableDistanceFieldPaths) {
+ prcOptions.fGpuPathRenderers &= ~GrContextOptions::GpuPathRenderers::kDistanceField;
+ }
fDrawingManager.reset(new GrDrawingManager(this, prcOptions, &fSingleOwner));
fAtlasGlyphCache = new GrAtlasGlyphCache(this, options.fGlyphCacheTextureMaximumBytes);