Bug 297843
| Summary: | Use ComplexTextController even for the simple text code path for GTK and WPE ports | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Fujii Hironori <fujii> |
| Component: | Text | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | fantasai.bugs, vitor.roriz, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=299278 | ||
Fujii Hironori
200076@main changed to always use the complex text code path for GTK and WPE ports.
This was done by using `FontCascade::setCodePath(CodePath::Complex)` to choose the complex text code path.
However, this approach involves a unnecessary performance regression.
In most of layout perf test cases, the complex and simple text code paths consume only a tiny portion of time.
In WebCore layout and rendering code, there are some conditions checking the code path like `if (fontCascade.codePath(TextRun(content)) == FontCascade::CodePath::Complex)`.
This yields the difference in performance.
For example, this is a condition making the difference.
https://github.com/WebKit/WebKit/blob/5b46346c7d149fbccefc7835cdce797b999de794/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp#L82
Thus, we shouldn't use `FontCascade::setCodePath()` to choose the code path.
In bug#297088, I studied the possibility of implementing Font::applyTransforms with HarfBuzz.
However, HarfBuzz doesn't have an API to implement Font::applyTransforms efficiently.
I'm going to ComplexTextController even for the simple text code path for GTK and WPE ports
the perf test result of bug#297088 comment#12 compares complex, simple and complex-only.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Fujii Hironori
Pull request: https://github.com/WebKit/WebKit/pull/49831
EWS
Committed 299354@main (23619bf93e9c): <https://commits.webkit.org/299354@main>
Reviewed commits have been landed. Closing PR #49831 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/159499112>