diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-05-26 14:01:16 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-05-26 12:14:30 +0000 |
commit | 210c533bcfd207640617642dc4e79c638845c560 (patch) | |
tree | 93e94b0beb3913733bc236c2b699cc809b23d009 | |
parent | ec8560805df3fb9d6ae285979b0f59b3c7834c5d (diff) |
FIXUP:[Backport] SkFontHost_FreeType constructor to correctly release resources
Keep the use of SkFixedToScalar as it was before the patch, otherwise
we merged an unrelated change and break rendering.
Change-Id: I422136e94f6de55f1a096ee3b7376ffa7320fd08
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
-rw-r--r-- | chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp b/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp index fd32893e7c0..07857ff953c 100644 --- a/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp +++ b/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp @@ -919,7 +919,7 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(SkTypeface* typeface, const S } if (FT_IS_SCALABLE(ftFace)) { - err = FT_Set_Char_Size(ftFace.get(), fScaleX, fScaleY, 72, 72); + err = FT_Set_Char_Size(ftFace.get(), SkFixedToScalar(fScaleX), SkFixedToScalar(fScaleY), 72, 72); if (err != 0) { SkDEBUGF(("FT_Set_CharSize(%08x, 0x%x, 0x%x) returned 0x%x\n", ftFace.get(), fScaleX, fScaleY, err)); @@ -930,7 +930,7 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(SkTypeface* typeface, const S fStrikeIndex = chooseBitmapStrike(ftFace.get(), fScaleY); if (fStrikeIndex == -1) { SkDEBUGF(("no glyphs for font \"%s\" size %f?\n", - ftFace->family_name, SkFDot6ToScalar(fScaleY))); + ftFace->family_name, SkFixedToScalar(fScaleY))); } else { // FreeType does no provide linear metrics for bitmap fonts. linearMetrics = false; @@ -945,7 +945,7 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(SkTypeface* typeface, const S } } else { SkDEBUGF(("unknown kind of font \"%s\" size %f?\n", - fFace->family_name, SkFixedToScalar(fScaleY))); + ftFace->family_name, SkFixedToScalar(fScaleY))); } fFTSize = ftSize.release(); |