diff options
author | Lee Salzman <lsalzman@mozilla.com> | 2017-01-27 14:31:10 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-27 20:16:20 +0000 |
commit | 26d3f217bf2042f680cb4ada07a68303f2f7fd3d (patch) | |
tree | 32e6be63f640a1601c9551248fe883540d57e2db /src/gpu | |
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>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/text/GrAtlasTextBlob.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp index 321c4a6750..601eb372ea 100644 --- a/src/gpu/text/GrAtlasTextBlob.cpp +++ b/src/gpu/text/GrAtlasTextBlob.cpp @@ -74,6 +74,9 @@ void GrAtlasTextBlob::appendGlyph(int runIndex, 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) { |