commit | 26d3f217bf2042f680cb4ada07a68303f2f7fd3d | [log] [tgz] |
---|---|---|
author | Lee Salzman <lsalzman@mozilla.com> | Fri Jan 27 14:31:10 2017 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Fri Jan 27 20:16:20 2017 +0000 |
tree | 32e6be63f640a1601c9551248fe883540d57e2db | |
parent | 6ccd2cabaac810edccab620d8a944f64b0432d44 [diff] |
verify that glyph position rect is non-empty in GrAtlasTextBlob::appendGlyph BUG=skia: Change-Id: I35d170480cb3320a9d116e34aaf740aa201a294f Reviewed-on: https://skia-review.googlesource.com/7700 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp index 321c4a6..601eb37 100644 --- a/src/gpu/text/GrAtlasTextBlob.cpp +++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -74,6 +74,9 @@ GrGlyph* glyph, SkGlyphCache* cache, const SkGlyph& skGlyph, SkScalar x, SkScalar y, SkScalar scale, bool treatAsBMP) { + if (positions.isEmpty()) { + return; + } // If the glyph is too large we fall back to paths if (glyph->fTooLargeForAtlas) {