-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
When tests or engine code (e.g. PerformanceOverlayLayer::MakeStatisticsText in flow/layers/performance_overlay_layer.cc) use a default constructed SkFont or otherwise rely on the default installed SkFontMgr, Skia will fallback to an empty typeface when there is no valid default font manager.
Fuchsia does not configure a font manager in this way, so unit tests run on Fuchsia will encounter this issue. Drawn text blobs with an empty typeface can have empty bounds, which may lead to SkCanvas quick-rejecting them. This complicates or leads to incorrect test expectations when run on that platform vs. those that have a default installed font manager.
For now it seems reasonable to skip these tests on Fuchsia, but a longer term solution would be to update the engine to not rely on default SkFont in this way, or otherwise plumb SkFontMgr_New_Fuchsia to all necessary places. Another option would be to update MockCanvas to not utilize the quick-reject API and just record draw calls and update test expectations to reflect what's expected for Flutter to invoke on SkCanvas, and not what's expected of SkCanvas itself.