top | item 15312966

Introduction to WebRender

175 points| adamnemecek | 8 years ago |mozillagfx.wordpress.com | reply

59 comments

order
[+] kibwen|8 years ago|reply
Note that WebRender won't be ready in time for Firefox 57 (yesterday was the cutoff for getting into 57), but the Servo devs tell me that it plans to be enabled by default in Firefox Nightly by the end of the year. So if you try Firefox 57 and find that it's still not as fast as you'd like, keep your eye out for when this lands early next year. :)
[+] Ygg2|8 years ago|reply
I'm actually quite impressed with how Firefox Nightly is snappy.

The only part missing, is Firefox slightly slower startup time (although that improved as well).

[+] whowouldathunk|8 years ago|reply
Not using the OS compositor locks you out of some cool stuff like backdrop blur and global lighting effects. At least on Windows, where both the native UI framework (XAML) and web platform use DirectComposition and thus can both benefit from it for effects and smooth scrolling. Which also means scrolling in apps can feel the same as scrolling in the browser.

Disclosure: I work at Microsoft, not on anything related to graphics rendering or the compositor though.

[+] pcwalton|8 years ago|reply
Not using the system compositor for Web content doesn't mean you can't use it for OS integration: for example, WR could use DirectComposition to blend locally composited Web content over the desktop.

As for scrolling, it is more work for us to match the OS scrolling behavior, for sure. But it can be overcome with effort and attention to detail.

It's also important to note that adapting the CSS 2.1 Appendix E painting model to an OS compositor is itself an impedance mismatch. I wouldn't be surprised if WR's approach ends up being less code overall, simply by avoiding the need to shoehorn CSS into the OS compositor (which is also platform specific code). That's before you get into the large performance benefits you get from global optimizations like Z-culling, which generally aren't available when using the system compositor.

[+] raphlinus|8 years ago|reply
Apologies if this is a derail, but how does DirectComposition compare to IDXGISwapChain1::Present1 for high performance scrolling and things like blinking a cursor with minimal energy usage? I was looking at the latter for the Windows port of xi-editor, and unaware of the former. I'm less concerned with fancy graphics effects, but perhaps if they're available at low cost I would consider using them.

I'm also looking to optimize smoothness on window resize, which I've noticed to be pretty janky in many applications.

[+] CoreXtreme|8 years ago|reply
Firefox has fixed all issues for me. I am about to dump Chrome, just give me fast startup time.
[+] emerged|8 years ago|reply
Since startup time is important, why don't browsers just stay running but pause all threads? The memory consumption of a browser process without any tabs open is insignificant for the vast majority of users.
[+] bronz|8 years ago|reply
kind of a side note here, but the one thing, the one and only thing preventing me from uninstalling chrome is the fact that i need to use chrome to make google voice calls in the browser as far as i can tell. when i try to do it in firefox, i just get a strange message about it not being supported. this is really annoying!
[+] Manishearth|8 years ago|reply
This isn't something Firefox can fix, it's up to the Hangouts team to fix this.
[+] lostmsu|8 years ago|reply
After reading the article, I still don't know what's new in WebRender
[+] Rusky|8 years ago|reply
That's intentional- this is "Part 1 - Browsers today."
[+] noncoml|8 years ago|reply
Firefox, please get your shit together and start focusing again on making a competitive browser again.

Wanting to lead is good, but will not take you anywhere is no one is using your browser.

All the other science project are not good, so please scrap them now.

[+] ubertaco|8 years ago|reply
I'm interested in what you think it would take to "[make] a competitive browser again" if not major performance improvements.
[+] nindalf|8 years ago|reply
You clearly want them to prioritise market share but I noticed you didn't provide any direction on how to do that other than "stop what you're doing now". Not only is that unhelpful, it seems like your comment is plain wrong. The best way to gain market share is to build a better product, which is what they're doing.
[+] mozumder|8 years ago|reply
Not sure how useful any of this will be without a full-fledged GPU-based font renderer.
[+] metajack|8 years ago|reply
For normal web pages, rasterization of fonts is not a big deal. This is obviously not the case when projected into VR.

WR rasterizes glyphs into font atlases and uploads those to the GPU. Those atlases are cached for use later and can be selectively updated if need be.

We also are working on path rasterization on the GPU with Pathfinder, so that will handle the other use cases plus things like SVG.

[+] sp332|8 years ago|reply
Skia isn't GPU-accelerated enough? It's what Chrome uses too right?
[+] slezyr|8 years ago|reply
How you do multiple async http requests in rust? Last time I checked the only way do it was using tokio crate. But tokio is a huge mess and looked like Rust++. I.e. some language based on rust.
[+] ekidd|8 years ago|reply
There's a ton of work being done at the compiler level to make Tokio more pleasant. This includes:

1. async/await. This is analogous to async/await in C# and ES6, and should make the syntax a lot nicer. https://github.com/alexcrichton/futures-await

2. Coroutines. This is the supporting technology for async/await. https://github.com/rust-lang/rfcs/blob/master/text/2033-expe...

3. 'impl Trait'. This provides a way to say, "Look, my return type implements 'Trait', but the actual type declaration is way to tedious to write out, and anyway, it's private. This will help a lot with cleaning up complex Tokio types. https://github.com/rust-lang/rfcs/blob/master/text/1522-cons...

At work, we use Rust, but we're avoiding using Tokio until these features land.

[+] kibwen|8 years ago|reply
I suspect you're being downvoted for being off-topic, consider asking on reddit.com/r/rust or StackOverflow.