Remove Cairo usage from Skia FreeType font host
Categories
(Core :: Graphics: Text, enhancement, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | fixed |
People
(Reporter: lsalzman, Assigned: lsalzman)
References
Details
(Whiteboard: [wr-q3][wr-sept])
Attachments
(9 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
SkFontHost_cairo depends on the interposition of Cairo for dealing with creating/loading FreeType faces. This imposes annoying limits on our Skia text rasterization such as a lack of subpixel text positioning if desired on Android and Linux. It also forces us to build and maintain FcPattern structures that cause memory bloat and have performance overhead to interpret.
We need to move the creation of FreeType faces into the Moz2D/thebes code. We will probably need to modify our tree Cairo if necessary to accept the raw FreeType faces and any other parameters necessary to interpret them without having to rely on the FcPatterns.
It might then be subsequently possible to remove SkFontHost_cairo entirely and rely on a small set of modifications to the provided SkFontHost_FreeType instead.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
About 2 months ago subpixel positioning was added to Cairo: https://gitlab.freedesktop.org/cairo/cairo/commits/master
Does that perhaps remove the need to drop Cairo? Or maybe some of the current Linux text rendering issues can be fixed using that until Cairo is removed?
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to Ivan Molodetskikh from comment #1)
About 2 months ago subpixel positioning was added to Cairo: https://gitlab.freedesktop.org/cairo/cairo/commits/master
Does that perhaps remove the need to drop Cairo? Or maybe some of the current Linux text rendering issues can be fixed using that until Cairo is removed?
Getting Cairo out of the way of things it shouldn't be involved in is still the right thing to do. Though, this might help in other cases where we can't once I finish this bug.
Comment 3•6 years ago
|
||
It's also worth mentioning that AFAIK we haven't updated mozilla's copy of cairo in a long time, and have done various local patches -- it's basically a forked version at this point -- so merging significant changes from upstream cairo may be non-trivial...
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #3)
It's also worth mentioning that AFAIK we haven't updated mozilla's copy of cairo in a long time, and have done various local patches -- it's basically a forked version at this point -- so merging significant changes from upstream cairo may be non-trivial...
The patches here seem small enough that a hand-merge/manual graft seem easily feasible, just that there is no real excuse for Cairo to still be interposed here in the first place. So likely both of these are things we want to accomplish.
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
Depends on D44491
Assignee | ||
Comment 7•6 years ago
|
||
Depends on D44492
Assignee | ||
Comment 8•6 years ago
|
||
Depends on D44493
Assignee | ||
Comment 9•6 years ago
|
||
Depends on D44494
Assignee | ||
Comment 10•6 years ago
|
||
Depends on D44495
Assignee | ||
Comment 11•6 years ago
|
||
Depends on D44496
Assignee | ||
Comment 12•6 years ago
|
||
Depends on D44497
Assignee | ||
Updated•6 years ago
|
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e74a67e2afe3
https://hg.mozilla.org/mozilla-central/rev/772c3427c791
https://hg.mozilla.org/mozilla-central/rev/ebc71e607938
https://hg.mozilla.org/mozilla-central/rev/af6e6807ece7
https://hg.mozilla.org/mozilla-central/rev/23892ecc6ef8
https://hg.mozilla.org/mozilla-central/rev/2c7032b4d022
https://hg.mozilla.org/mozilla-central/rev/003f5a79c6a7
https://hg.mozilla.org/mozilla-central/rev/c969a93b0ca7
Assignee | ||
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
Backed out changes in comment 14 for causing bug 1581466: https://hg.mozilla.org/mozilla-central/rev/ece24a197d500be1d4f48838c6f4a12a2fb1861c
Comment 18•5 years ago
|
||
Assignee | ||
Comment 19•5 years ago
|
||
Fixed the printing crash. Should be fixed when I reland. Doing a try push now to verify.
Comment 20•5 years ago
|
||
Comment 21•5 years ago
|
||
Comment 22•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fe7f211ad6a3
https://hg.mozilla.org/mozilla-central/rev/0b008480f41c
https://hg.mozilla.org/mozilla-central/rev/e15c477972e6
https://hg.mozilla.org/mozilla-central/rev/542af2a68a49
https://hg.mozilla.org/mozilla-central/rev/880865a950e5
https://hg.mozilla.org/mozilla-central/rev/99b28f31b550
https://hg.mozilla.org/mozilla-central/rev/699f10cc0658
https://hg.mozilla.org/mozilla-central/rev/e2324b6a2b33
https://hg.mozilla.org/mozilla-central/rev/c0ff29989db1
Comment 23•5 years ago
|
||
== Change summary for alert #23211 (as of Tue, 24 Sep 2019 07:40:20 GMT) ==
Improvements:
5% Heap Unclassified linux64 opt 82,886,558.17 -> 79,008,195.00
4% Heap Unclassified linux64 opt 82,543,552.35 -> 79,023,892.13
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=23211
Description
•