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 upRender glyphs with Pathfinder if the `pathfinder` feature flag is enabled. #2566
Conversation
|
Awesome! Will review first thing Monday :) |
|
Windows CI failure:
|
|
Would this change make freetype (possibly) obsolete in the future? |
|
No, because FreeType is still used to load the outlines and hint the
glyphs. Besides, HarfBuzz has to use it during layout, I believe.
…On Sat, Mar 24, 2018, 8:09 AM fschutt ***@***.***> wrote:
Question, would this change make freetype (possibly) obsolete in the
future?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2566 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAJoydMFOOY4OMBnIEAV8E2ZOEw_oiueks5thmGxgaJpZM4S5bQm>
.
|
|
Reviewed 24 of 24 files at r1. webrender/Cargo.toml, line 13 at r1 (raw file):
Why is image no longer an optional dependency? webrender/res/ps_text_run.glsl, line 177 at r1 (raw file):
Is this necessary? For the normal (CPU rendered) alpha mode, we store the channels correctly in the RGBA output during rasterization, so there's no runtime swizzle needed in this case. webrender/src/device.rs, line 441 at r1 (raw file):
Why do we need to store this as TextureTarget and calculate the GL target each time it's used? webrender/src/glyph_rasterizer.rs, line 530 at r1 (raw file):
Could you expand on this TODO? webrender/src/texture_cache.rs, line 174 at r1 (raw file):
Texture cache handles shouldn't be cloned in normal use - if one is updated then the other won't have the correct location. Is this still relied on? webrender/src/tiling.rs, line 977 at r1 (raw file):
This doesn't seem right. The two addresses are the render task being drawn to (provides target rect etc) and the source render task we are going to blur. Comments from Reviewable |
|
The main bits I don't fully understand yet are:
I think the second one is probably because we don't have proper support for multiple top-level render task trees yet, and the pathfinder stuff doesn't really fit into the hierarchical nature of the existing render task tree? I've been planning to support multiple roots in the task tree at some point, which I think will tidy this stuff up. I'll take another look at it this afternoon regarding the first question above. We'll also need to do a gecko try (instructions here https://wiki.mozilla.org/Platform/GFX/Quantum_Render#Try_syntax) and it'd be good to add an entry to the TaskCluster config file in the repo that builds the Pathfinder feature, so we at least don't regress on compilation errors there. |
|
|
|
Review status: all files reviewed at latest revision, 6 unresolved discussions, some commit checks failed. webrender/Cargo.toml, line 13 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
Because it's needed to load the area LUT, which is stored in PNG format. webrender/res/ps_text_run.glsl, line 177 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
Yes, it's needed to grab the single R8 texture channel properly from a webrender/src/device.rs, line 441 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
To make the webrender/src/glyph_rasterizer.rs, line 530 at r1 (raw file): Previously, glennw (Glenn Watson) wrote…
Oops, that was a comment I forgot to remove. Deleted it. Comments from Reviewable |
|
Review status: all files reviewed at latest revision, 5 unresolved discussions, some commit checks failed. webrender/Cargo.toml, line 13 at r1 (raw file): Previously, pcwalton (Patrick Walton) wrote…
Ah, that makes sense. Should we enable it only when pathfinder is enabled, so that Gecko doesn't pull in a new image dependency then? Perhaps in the future we could consider just embedding it in the binary as raw image data. webrender/res/ps_text_run.glsl, line 177 at r1 (raw file): Previously, pcwalton (Patrick Walton) wrote…
Instead of writing to an R8 texture though, what if we stored the output as an RGBA texture? That's what we currently do when rasterizing glyphs, even in alpha mode. The benefits of this are that we don't need an extra swizzle here (pay the cost during glyph rasterizing once rather than an extra cost during rendering the glyph each frame), and batching is better since glyphs will end up in the same texture atlas as almost everything else. Comments from Reviewable |
|
|
|
Updated per feedback. r? @glennw |
|
CI failures from
Are those ones easy to fix up? If not, we can possibly whitelist them as allowed duplicates, but that's not ideal. |
|
Reviewed 4 of 25 files at r1, 19 of 23 files at r2. webrender/src/device.rs, line 47 at r2 (raw file):
Is this still needed? Comments from Reviewable |
|
Looks good! Added a short list of the remaining things to get this merged:
|
|
I don't know why I tried upgrading to |
|
That num-traits error is weird - maybe the cargo log is wrong and there are other crates that depend on each of them? Also CI compile error on Windows (this might be on all platforms via
|
Emerentius
commented
Apr 3, 2018
|
|
|
Yeah the |
|
@glennw Updated to fix test build failure. |
|
@Emerentius Ah, thanks for the info. So, this means we should, for now, white-list having duplicate versions of that crate, right? @pcwalton that can be done in https://github.com/servo/webrender/blob/master/servo-tidy.toml, if that's the correct thing to do here. |
|
@glennw It is the right thing to do |
|
@glennw Done. |
|
I have pushed a (pending) try build to Gecko with this patch, just to make sure it doesn't break anything in the default code path: https://hg.mozilla.org/try/rev/20feada4fb73b5467cd45bb274093a78674838d8 The WR CI build is failing on one of the configs that denies warnings:
|
enabled. This is very preliminary. Notable problems: * Intermediate textures are not cached. * Font appearance resembles that of macOS regardless of platform. * Subpixel AA is always used, even if disabled. * Emoji and other color glyphs will not render properly. We should fall back to the CPU for those. * There is no hinting or pixel snapping yet.
|
Pushed a new change that should eliminate that warning. |
|
The failing tests on try appear to be unrelated intermittent failures. @bors-servo r+ |
|
|
Render glyphs with Pathfinder if the `pathfinder` feature flag is enabled. This is very preliminary. Notable problems: * Intermediate textures are not cached. * Font appearance resembles that of macOS regardless of platform. * Subpixel AA is always used, even if disabled. * The `SourceTexture` extension is hacky. * Emoji and other color glyphs will not render properly. We should fall back to the CPU for those. * There is no hinting or pixel snapping yet. r? @glennw <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2566) <!-- Reviewable:end -->
|
|
ebraminio
commented
Jun 1, 2019
|
#2566 (comment) |

pcwalton commentedMar 23, 2018
•
edited by larsbergstrom
This is very preliminary. Notable problems:
Intermediate textures are not cached.
Font appearance resembles that of macOS regardless of platform.
Subpixel AA is always used, even if disabled.
The
SourceTextureextension is hacky.Emoji and other color glyphs will not render properly. We should fall
back to the CPU for those.
There is no hinting or pixel snapping yet.
r? @glennw
This change is