aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContextOptions.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-11-07 16:23:34 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-08 01:34:06 +0000
commitaf597481143ca4b17884360604be954a71cc34cf (patch)
tree64a02d4d48a1847f67e0c88f6f28ee9eff175f99 /include/gpu/GrContextOptions.h
parent85fb42ae4cffc335acc8da2d294209e2185f5848 (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 'include/gpu/GrContextOptions.h')
-rw-r--r--include/gpu/GrContextOptions.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index a3c914aa3b..967f880555 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -114,6 +114,19 @@ struct GrContextOptions {
float fGlyphCacheTextureMaximumBytes = 2048 * 1024 * 4;
/**
+ * Below this threshold size in device space distance field fonts won't be used. Distance field
+ * fonts don't support hinting which is more important at smaller sizes. A negative value means
+ * use the default threshold.
+ */
+ float fMinDistanceFieldFontSize = -1.f;
+
+ /**
+ * Above this threshold size in device space glyphs are drawn as individual paths. A negative
+ * value means use the default threshold.
+ */
+ float fGlyphsAsPathsFontSize = -1.f;
+
+ /**
* Can the glyph atlas use multiple textures. If allowed, the each texture's size is bound by
* fGlypheCacheTextureMaximumBytes.
*/