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
This commit is contained in:
reed@google.com 2012-09-21 17:38:06 +00:00
parent c544325fdb
commit 8136d58161

View File

@ -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;