diff options
author | 2012-09-21 17:38:06 +0000 | |
---|---|---|
committer | 2012-09-21 17:38:06 +0000 | |
commit | 8136d58161c3fa314af42f5c65682be855dfec1b (patch) | |
tree | e1a45fcd4a61c9e7dfdc832a9d4a0f503729bdcc /src/core/SkScalerContext.cpp | |
parent | c544325fdb7148b5cbcf199325b137e814ea457f (diff) |
check for very large blurs, and don't try to cache the result in fontcache
http://code.google.com/p/chromium/issues/detail?id=138208
git-svn-id: http://skia.googlecode.com/svn/trunk@5640 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkScalerContext.cpp')
-rw-r--r-- | src/core/SkScalerContext.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 59b7771ac4..86bb7c900f 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -315,6 +315,9 @@ void SkScalerContext::getMetrics(SkGlyph* glyph) { src.fImage = NULL; // only want the bounds from the filter if (fMaskFilter->filterMask(&dst, src, matrix, NULL)) { + if (dst.fBounds.isEmpty() || !dst.fBounds.is16Bit()) { + goto SK_ERROR; + } SkASSERT(dst.fImage == NULL); glyph->fLeft = dst.fBounds.fLeft; glyph->fTop = dst.fBounds.fTop; |