Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upplan: text decoration blob support #1418
Comments
|
Clarification: drawTextWithEffect probably only forwards a subset of the effects. i.e. blurring of the shadow should be a finalization step, and not something each piece of the text does itself. |
|
Ran into an issue in implementation: "hello https://drafts.csswg.org/css-text-decor-3/#text-shadow-property
Discussing with some of the folks it seemed like the best path forward would involve introducing some kind of non-stacking-context to group a bunch of elements and say "these should have shadows" so the shadows can be done all at once. This would also let us remove the decorations from the text and just have them as "normal" blob images. I need to do more experiments to figure out exactly what Gecko's doing here. |
|
Closing as per IRC discussion. The WR part is done for the most part. |
So today if gecko has text decorations that webrender can't handle we give up completely and produce a blob image for the text. I'd like to improve this situation so that webrender handles the things it can natively, but invokes gecko via blob images for the parts that it can't.
At the high level I want webrender to receive something like:
And for its rendering strategy to be something like:
Potentially the drawTextWithEffect can actually be cached like:
But I have no idea if that approach is actually practical.
Note: I am currently omitting text-emphasis marks and selection from this description. I think selection can be handled by the client (drawing a box and tweaking colors), but I'm less certain about emphasis (they strictly should be drawn between text and linethrough -- possibly just needs to be a second list of glyphs).
Summary of Benefits