Chromium Code Reviews| Index: src/gpu/GrTextStrike.cpp |
| diff --git a/src/gpu/GrTextStrike.cpp b/src/gpu/GrTextStrike.cpp |
| index 0186af1f63a8538dbfc997c5db9e0237dd9ce094..0fbe6011df54d508a3cfb434fdbdf619c8e6963d 100644 |
| --- a/src/gpu/GrTextStrike.cpp |
| +++ b/src/gpu/GrTextStrike.cpp |
| @@ -227,7 +227,7 @@ void GrFontCache::dump() const { |
| atlas and a position within that texture. |
| */ |
| -GrTextStrike::GrTextStrike(GrFontCache* cache, const GrFontDescKey* key) : fPool(64) { |
| +GrTextStrike::GrTextStrike(GrFontCache* cache, const GrFontDescKey* key) { |
| fFontScalerKey = key; |
| fFontScalerKey->ref(); |
| @@ -267,7 +267,7 @@ GrGlyph* GrTextStrike::generateGlyph(GrGlyph::PackedID packed, |
| } |
| GrMaskFormat format = scaler->getPackedGlyphMaskFormat(packed); |
| - GrGlyph* glyph = fPool.alloc(); |
| + GrGlyph* glyph = (GrGlyph*)fPool.alloc(sizeof(GrGlyph), 0); |
|
mtklein
2014/11/21 14:57:01
Are you sure you don't want SK_MALLOC_THROW here?
|
| glyph->init(packed, bounds, format); |
| fCache.add(glyph); |
| return glyph; |