Skip to content

[GTK][WPE][Skia] Improve text rendering performance, bring back simple text code path #47225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikolaszimmermann
Copy link
Contributor

@nikolaszimmermann nikolaszimmermann commented Jun 26, 2025

ce43649

[GTK][WPE][Skia] Improve text rendering performance, bring back simple text code path
https://bugs.webkit.org/show_bug.cgi?id=295019

Reviewed by NOBODY (OOPS!).

WIP: Investigate if we can improve performance, while retaining correctness,
when switching from always-force-complex-text mode to auto-detection again.

Covered by existing tests.

* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::codePath const):
* Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitialize):

ce43649

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ❌ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ❌ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

…e text code path

https://bugs.webkit.org/show_bug.cgi?id=295019

Reviewed by NOBODY (OOPS!).

WIP: Investigate if we can improve performance, while retaining correctness,
when switching from always-force-complex-text mode to auto-detection again.

Covered by existing tests.

* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::codePath const):
* Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitialize):
@nikolaszimmermann nikolaszimmermann requested a review from a team as a code owner June 26, 2025 08:15
@nikolaszimmermann nikolaszimmermann self-assigned this Jun 26, 2025
@nikolaszimmermann nikolaszimmermann added the WPE WebKit WebKit WPE component label Jun 26, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 26, 2025
@@ -657,11 +657,6 @@ FontCascade::CodePath FontCascade::codePath(const TextRun& run, std::optional<un

// FIXME: https://bugs.webkit.org/show_bug.cgi?id=150791: @font-face features should also cause this to be complex.

#if !USE(FONT_VARIANT_VIA_FEATURES) && !USE(FREETYPE)
if (run.length() > 1 && (enableKerning() || requiresShaping()))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have support for kerning in our simple code path (Font::applyTransforms is only implemented for CoreText) -- I want to see the impact on layout tests of that change though.

@mcatanzaro mcatanzaro marked this pull request as draft June 26, 2025 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merging-blocked Applied to prevent a change from being merged WPE WebKit WebKit WPE component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants