diff options
author | 2017-11-07 16:23:34 -0500 | |
---|---|---|
committer | 2017-11-08 01:34:06 +0000 | |
commit | af597481143ca4b17884360604be954a71cc34cf (patch) | |
tree | 64a02d4d48a1847f67e0c88f6f28ee9eff175f99 /src/gpu/GrContext.cpp | |
parent | 85fb42ae4cffc335acc8da2d294209e2185f5848 (diff) |
Add GrContextOptions to control distance field thresholds for small sizes and fallback to paths.
Change-Id: Ib57c40b1b50c5afe079b2099d1a83986629ea287
Reviewed-on: https://skia-review.googlesource.com/68217
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index d3194be8f2..485bce3039 100644 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -202,7 +202,13 @@ bool GrContext::init(const GrContextOptions& options) { if (options.fDisableDistanceFieldPaths) { prcOptions.fGpuPathRenderers &= ~GpuPathRenderers::kSmall; } - fDrawingManager.reset(new GrDrawingManager(this, prcOptions, &fSingleOwner)); + + GrAtlasTextContext::Options atlasTextContextOptions; + atlasTextContextOptions.fMaxDistanceFieldFontSize = options.fGlyphsAsPathsFontSize; + atlasTextContextOptions.fMinDistanceFieldFontSize = options.fMinDistanceFieldFontSize; + + fDrawingManager.reset( + new GrDrawingManager(this, prcOptions, atlasTextContextOptions, &fSingleOwner)); GrDrawOpAtlas::AllowMultitexturing allowMultitexturing; if (options.fAllowMultipleGlyphCacheTextures == GrContextOptions::Enable::kNo) { |