Protect glyph sub-pixel placement against NaN and Inf.
BUG=chromium:675106 Change-Id: I3f8f2575ca3d1b02615be00d66cf7a123407c5a3 Reviewed-on: https://skia-review.googlesource.com/6404 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
4bf98e7e80
commit
49e59b2df4
@ -436,6 +436,9 @@ private:
|
||||
|
||||
SkPoint findAndPositionGlyph(
|
||||
const char** text, SkPoint position, ProcessOneGlyph&& processOneGlyph) override {
|
||||
if (!SkScalarsAreFinite(position.fX, position.fY)) {
|
||||
return position;
|
||||
}
|
||||
SkPoint finalPosition = position;
|
||||
if (kTextAlignment != SkPaint::kLeft_Align) {
|
||||
// Get the width of an un-sub-pixel positioned glyph for calculating the
|
||||
|
Loading…
Reference in New Issue
Block a user