diff options
author | 2015-07-30 12:43:17 -0700 | |
---|---|---|
committer | 2015-07-30 12:43:17 -0700 | |
commit | 381b26f03bdccac1e3d9055fb4f7855792cfefb0 (patch) | |
tree | 62f37e9dc28e16536cfd7a63def9c230c714ef3f | |
parent | 159fa572c45cba98d32832c2b59f630063fbb201 (diff) |
find image whenever we generateGlyph. This should ensure the glyph is fully initialized before we start using the maskformat.
BUG=skia:
Review URL: https://codereview.chromium.org/1270573003
-rw-r--r-- | src/gpu/GrFontScaler.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/GrFontScaler.cpp b/src/gpu/GrFontScaler.cpp index a9d5abff4e..b4ec1beed3 100644 --- a/src/gpu/GrFontScaler.cpp +++ b/src/gpu/GrFontScaler.cpp @@ -64,12 +64,22 @@ GrMaskFormat GrFontScaler::getPackedGlyphMaskFormat(const SkGlyph& glyph) const } bool GrFontScaler::getPackedGlyphBounds(const SkGlyph& glyph, SkIRect* bounds) { +#if 1 + // crbug:510931 + // Retrieving the image from the cache can actually change the mask format. + fStrike->findImage(glyph); +#endif bounds->setXYWH(glyph.fLeft, glyph.fTop, glyph.fWidth, glyph.fHeight); return true; } bool GrFontScaler::getPackedGlyphDFBounds(const SkGlyph& glyph, SkIRect* bounds) { +#if 1 + // crbug:510931 + // Retrieving the image from the cache can actually change the mask format. + fStrike->findImage(glyph); +#endif bounds->setXYWH(glyph.fLeft, glyph.fTop, glyph.fWidth, glyph.fHeight); bounds->outset(SK_DistanceFieldPad, SK_DistanceFieldPad); |