diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-26 20:43:27 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-11-26 20:43:27 +0000 |
commit | 7435f34b4720241f20d101879dffdcbf678a53a0 (patch) | |
tree | 619e2bcee695ce6d6ca5fc20ef4c62132a0f9600 /src | |
parent | 3daa1aed7a817f296fffb1e24f86bcb6bf56ce2f (diff) |
Minimal changes to not crash GPU with color fonts.
Review URL: https://codereview.chromium.org/88993003
git-svn-id: http://skia.googlecode.com/svn/trunk@12400 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/fonts/SkGScalerContext.cpp | 2 | ||||
-rw-r--r-- | src/gpu/SkGrFontScaler.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp index f0543c571a..551b01c961 100644 --- a/src/fonts/SkGScalerContext.cpp +++ b/src/fonts/SkGScalerContext.cpp @@ -176,6 +176,8 @@ SkScalerContext* SkGTypeface::onCreateScalerContext( void SkGTypeface::onFilterRec(SkScalerContextRec* rec) const { fProxy->filterRec(rec); + rec->setHinting(SkPaint::kNo_Hinting); + rec->fMaskFormat = SkMask::kARGB32_Format; } SkAdvancedTypefaceMetrics* SkGTypeface::onGetAdvancedTypefaceMetrics( diff --git a/src/gpu/SkGrFontScaler.cpp b/src/gpu/SkGrFontScaler.cpp index 651486665b..1ca9357c6b 100644 --- a/src/gpu/SkGrFontScaler.cpp +++ b/src/gpu/SkGrFontScaler.cpp @@ -85,6 +85,8 @@ GrMaskFormat SkGrFontScaler::getMaskFormat() { return kA8_GrMaskFormat; case SkMask::kLCD16_Format: return kA565_GrMaskFormat; + // TODO: properly support kARGB32_Format. + case SkMask::kARGB32_Format: case SkMask::kLCD32_Format: return kA888_GrMaskFormat; default: |