aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ben Wagner <benjaminwagner@google.com>2017-09-15 16:00:40 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-20 15:39:53 +0000
commit4f6fc83a83e11cd30be4068832c77f7bf10bd4c4 (patch)
treebf1a179193e54749744495b1fee68cac86be797a
parentfb6a7891915014092eebb874d0655dc886019414 (diff)
Fix float-cast-overflow in SkTypeface_FreeType::onGetAdvancedMetrics
Bug: skia:4632 Change-Id: Id2ee217787e6741011f324951f11eeefc55f62b9 Reviewed-on: https://skia-review.googlesource.com/47321 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-UBSAN_float_cast_overflow.json16
-rw-r--r--infra/bots/recipes/test.py4
-rw-r--r--src/ports/SkFontHost_FreeType.cpp2
3 files changed, 1 insertions, 21 deletions
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-UBSAN_float_cast_overflow.json b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-UBSAN_float_cast_overflow.json
index 3ad846b965..d5de1ce408 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-UBSAN_float_cast_overflow.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-UBSAN_float_cast_overflow.json
@@ -502,22 +502,6 @@
"gm",
"_",
"conicpaths",
- "pdf",
- "gm",
- "_",
- "fontmgr_iterDebian9",
- "pdf",
- "gm",
- "_",
- "fontmgr_matchDebian9",
- "pdf",
- "gm",
- "_",
- "typefacestylesDebian",
- "pdf",
- "gm",
- "_",
- "typefacestyles_kerningDebian",
"--match",
"~^DashPathEffectTest_asPoints_limit$",
"~^PathBigCubic$",
diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py
index 5dd5dc4f9b..d33afc821b 100644
--- a/infra/bots/recipes/test.py
+++ b/infra/bots/recipes/test.py
@@ -534,10 +534,6 @@ def dm_flags(api, bot):
blacklist([config, 'gm', '_', 'bigrect'])
blacklist([config, 'gm', '_', 'clippedcubic2'])
blacklist([config, 'gm', '_', 'conicpaths'])
- blacklist(['pdf', 'gm', '_', 'fontmgr_iterDebian9'])
- blacklist(['pdf', 'gm', '_', 'fontmgr_matchDebian9'])
- blacklist(['pdf', 'gm', '_', 'typefacestylesDebian'])
- blacklist(['pdf', 'gm', '_', 'typefacestyles_kerningDebian'])
match.append('~^DashPathEffectTest_asPoints_limit$')
match.append('~^PathBigCubic$')
match.append('~^PathOpsCubicIntersection$')
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 0f2ef15f63..340572a268 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -574,7 +574,7 @@ std::unique_ptr<SkAdvancedTypefaceMetrics> SkTypeface_FreeType::onGetAdvancedMet
if (FT_Get_PS_Font_Info(face, &psFontInfo) == 0) {
info->fItalicAngle = psFontInfo.italic_angle;
} else if ((postTable = (TT_Postscript*)FT_Get_Sfnt_Table(face, ft_sfnt_post)) != nullptr) {
- info->fItalicAngle = SkFixedToScalar(postTable->italicAngle);
+ info->fItalicAngle = SkFixedFloorToInt(postTable->italicAngle);
} else {
info->fItalicAngle = 0;
}