From 922c7250bd16297ea44e8550cf8625133f67f523 Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Tue, 30 May 2023 23:33:00 +0000 Subject: [PATCH] [Impeller] Fixed TypographerTest.MaybeHasOverlapping (flutter/engine#42429) fixes https://github.com/flutter/flutter/issues/127714 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style --- .../flutter/impeller/typographer/typographer_unittests.cc | 7 ++++++- engine/src/flutter/testing/run_tests.py | 8 ++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/engine/src/flutter/impeller/typographer/typographer_unittests.cc b/engine/src/flutter/impeller/typographer/typographer_unittests.cc index 24564dac3f..b697ca1be1 100644 --- a/engine/src/flutter/impeller/typographer/typographer_unittests.cc +++ b/engine/src/flutter/impeller/typographer/typographer_unittests.cc @@ -9,6 +9,7 @@ #include "impeller/typographer/lazy_glyph_atlas.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkData.h" +#include "third_party/skia/include/core/SkFontMgr.h" #include "third_party/skia/include/core/SkTextBlob.h" // TODO(zanderso): https://github.com/flutter/flutter/issues/127701 @@ -292,7 +293,11 @@ TEST_P(TypographerTest, FontGlyphPairTypeChangesHashAndEquals) { } TEST_P(TypographerTest, MaybeHasOverlapping) { - SkFont sk_font; + sk_sp font_mgr = SkFontMgr::RefDefault(); + sk_sp typeface = + font_mgr->matchFamilyStyle("Arial", SkFontStyle::Normal()); + SkFont sk_font(typeface, 0.5f); + auto frame = TextFrameFromTextBlob(SkTextBlob::MakeFromString("1", sk_font)); // Single character has no overlapping ASSERT_FALSE(frame.MaybeHasOverlapping()); diff --git a/engine/src/flutter/testing/run_tests.py b/engine/src/flutter/testing/run_tests.py index 739f7ae62a..46e398e829 100755 --- a/engine/src/flutter/testing/run_tests.py +++ b/engine/src/flutter/testing/run_tests.py @@ -1200,12 +1200,8 @@ Flutter Wiki page on the subject: https://github.com/flutter/flutter/wiki/Testin build_dir, 'impeller_unittests', engine_filter, - # TODO(https://github.com/flutter/flutter/issues/127714): Remove test exemption. - shuffle_flags + [ - '--gtest_filter=-' - '*/OpenGLES:' - 'Play/TypographerTest.MaybeHasOverlapping/Vulkan:' - ], + shuffle_flags + ['--gtest_filter=-' + '*/OpenGLES:'], coverage=args.coverage ) finally: