aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-07-30 12:43:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-30 12:43:17 -0700
commit381b26f03bdccac1e3d9055fb4f7855792cfefb0 (patch)
tree62f37e9dc28e16536cfd7a63def9c230c714ef3f
parent159fa572c45cba98d32832c2b59f630063fbb201 (diff)
find image whenever we generateGlyph. This should ensure the glyph is fully initialized before we start using the maskformat.
-rw-r--r--src/gpu/GrFontScaler.cpp10
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);