aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScalerContext.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-03-16 07:34:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-16 07:34:02 -0700
commitd7ea92f2ff8ba41783296ff8e6203a59a5549c1a (patch)
treec712e4c9885d0e430f5b8e367b91de3bbffb5b72 /src/core/SkScalerContext.cpp
parent523fa2a332d9c621bb871337893270a2bde31ea1 (diff)
pass cap to dash text
Pass the paint cap parameter through to text rendering so that dashed text draws correctly. R=bungeman@google.com BUG=226341 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1776983002 Review URL: https://codereview.chromium.org/1776983002
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r--src/core/SkScalerContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index c67ca3e9fa..a479c3782f 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -100,9 +100,9 @@ SkScalerContext::SkScalerContext(SkTypeface* typeface, const SkDescriptor* desc)
SkDebugf(" textsize %g prescale %g preskew %g post [%g %g %g %g]\n",
rec->fTextSize, rec->fPreScaleX, rec->fPreSkewX, rec->fPost2x2[0][0],
rec->fPost2x2[0][1], rec->fPost2x2[1][0], rec->fPost2x2[1][1]);
- SkDebugf(" frame %g miter %g hints %d framefill %d format %d join %d\n",
+ SkDebugf(" frame %g miter %g hints %d framefill %d format %d join %d cap %d\n",
rec->fFrameWidth, rec->fMiterLimit, rec->fHints, rec->fFrameAndFill,
- rec->fMaskFormat, rec->fStrokeJoin);
+ rec->fMaskFormat, rec->fStrokeJoin, rec->fStrokeCap);
SkDebugf(" pathEffect %x maskFilter %x\n",
desc->findEntry(kPathEffect_SkDescriptorTag, nullptr),
desc->findEntry(kMaskFilter_SkDescriptorTag, nullptr));
@@ -635,7 +635,7 @@ void SkScalerContext::internalGetPath(const SkGlyph& glyph, SkPath* fillPath,
SkToBool(fRec.fFlags & kFrameAndFill_Flag));
// glyphs are always closed contours, so cap type is ignored,
// so we just pass something.
- rec.setStrokeParams(SkPaint::kButt_Cap,
+ rec.setStrokeParams((SkPaint::Cap)fRec.fStrokeCap,
(SkPaint::Join)fRec.fStrokeJoin,
fRec.fMiterLimit);
}