Live data from Hacker News

The web at maximum FPS: How WebRender gets rid of jank

hacks.mozilla.org

161–170 of 212 posts

Re: The web at maximum FPS: How WebRender gets rid of jank

#161
post #71

Re: HW Acceleration Is this going to work at all on Linux?

I have it enabled on one of my Firefox profiles. Would not yet recommend for normal browsing, there's still rendering errors and sometimes seemingly random performance drops, but you can definitely see it working.

That is, I have to be lucky for this benchmark [1] to not crash my "regular" Firefox Nightly. With WebRender on the other hand, the benchmark becomes entirely unimpressive, as if you were just playing a pre-rendered video.

My system has an Intel i5-3220M with HD Graphics 4000 (was midrange for a laptop in 2012) and 4GiB RAM. OS is openSUSE Tumbleweed with a KDE Plasma + bspwm combination as desktop environment, so no desktop compositor (no idea if that makes a difference).

[1] https://www.youtube.com/watch?v=u0hYIRQRiws

Re: The web at maximum FPS: How WebRender gets rid of jank

#162
post #73

Earlier quoted context omitted.

Your browser is doing ~60fps rendering on the GPU already, it's just doing it much less efficiently. This does less work on the CPU _and_ less work on the GPU, for the same result.

I'll admit I'm certainly not an expert on browser rendering pipelines, but that's not the impression the article gave. Rather, it suggested that current browser engines may, in fact, be more efficient in terms of the absolute number of computations done. When discussing existing browsers: > But often the things on these layers didn’t change from frame to frame. For example, think of a traditional animation. The backg…

It depends. For a lot of web pages, the things webrender do are actually very simple and can be faster than Firefox's compositor even if there was no painting required. The expensive stuff like rasterizing glyphs are cached. The idea is that if we can render everything at a cost that is equivalent to that of the compositor, then the benefits of the compositing infrastructure aren't clear anymore. For sure there will be pages where the compositor would have been faster for frames where no painting was required, at the end of the day it's a new architecture with new tradeoffs, but the goal is to be overall (much) faster.

Re: The web at maximum FPS: How WebRender gets rid of jank

#163

Earlier quoted context omitted.

They do, but we're targeting Intel HD quality graphics, not gaming-oriented NVIDIA and AMD GPUs. That said, even Intel GPUs can often deal with large numbers of draw calls just fine. It's mobile where they become a real issue. Aggressive batching is still important to take maximum advantage of parallelism. If you're switching shaders for every rect you draw, then you frequently lose to the CPU.

Speaking of batching, I look at this demo [1] on my mobile phone, and I can get ~3500 sprites without dropping below 60FPS. A web page may not be able to reuse as much image data, I know. But smart game engines frequently look for ways to better batch sprites. And technically speaking, if you're using a Z-buffer, you don't need to sort opaque layers at all . You can draw the layers in back and then draw more layers i…

As far as I understand this, that demo will have no benefit whatsoever from the changes described in the article. Since it uses with WebGL, it has always done all its rendering on the GPU in a videogame style way – in any version of any browser.

Re: The web at maximum FPS: How WebRender gets rid of jank

#164

Earlier quoted context omitted.

Interestingly, WebRender renders that demo at about 2fps. It's obviously a bug though, if you hold in the mouse, it's 60fps. Win 10, latest nightly, WebRender enabled

Weird; I'm on Win 10 with the latest nightly and WebRender enabled, I'm still getting 60fps with 10,000 bunnies. Maybe file a bug?

Interestingly enough, I'm getting same result on Mac OS. Unless I hold in the mouse, I get about 2 fps. Seems like the same result on all canvas instances. I'll file a bug.

Edit: https://bugzilla.mozilla.org/show_bug.cgi?id=1407448

Re: The web at maximum FPS: How WebRender gets rid of jank

#165
post #96

Earlier quoted context omitted.

Opera?

The company was STNC Ltd. The µbrowser was called Hitchhiker. STNC was acquired by Microsoft in July 99. My understanding is that the demo at GSM World in 98 was the first time anyone had demonstrated a graphical browser on a cellphone that implemented common web standards (HTML/HTTP/TCP) rather than using a transcoding gateway (up.link or WAP style — the approach taken by Unwired Planet) The smallest device that we…

I think back in 2000 I had a phone with your browser, the Benefon Q:

https://m.gsmarena.com/benefon_q-42.php

It even supported black&white animated GIFs in HTML pages.

Re: The web at maximum FPS: How WebRender gets rid of jank

#167
I tried testing it out on a ThinkPad T61 to see how well it works with an older embedded GPU (Intel 965 Express), but I can't enable it (on Windows 10) because D3D11 compositing is disabled, it says D3D11_COMPOSITING: Blocklisted; failure code BLOCKLIST_

So does that mean that it is known not to work with that GPU? Can you override the blocklist to see what happens?

Edit: It also says:

> Direct2D: Blocked for your graphics driver version mismatch between registry and DLL.

and

> CP+[GFX1-]: Mismatched driver versions between the registry 8.15.10.2697 and DLL(s) 8.14.10.2697, reported.

Indeed that is correct, the driver is marked as version 8.15.10.2697 but the fileversion of the dlls are 8.14.10.2697, this seems to be intentional by Microsoft or Intel, note that the build numbers are still the same. Firefox is quite naive if it thinks it can just try to match those.

Re: The web at maximum FPS: How WebRender gets rid of jank

#168
post #33

Earlier quoted context omitted.

The Radeon Pro 560 on my MacBook Pro can draw "up to 75W". I don't know anything about how it manages power, but I do recall that Apple recommended in a WWDC session on writing energy-efficient apps that one should be careful to not trigger the discrete GPU when the integrated Intel GPU is sufficient. So that leads to another question: on my machine, which GPU would Webrender be using? I suppose I could find out expe…

For WebRender, we targeted the integrated GPUs. You still need some logic to ensure you don't accidentally kick the discrete one into gear, but the integrated ones definitely have enough performance for almost anything WR will throw at it.

Could you elaborate the edge cases which fall beyond "almost anything WR will throw at it" ie what are the use cases where you would end up waking the discrete GPU?

Re: The web at maximum FPS: How WebRender gets rid of jank

#169
post #151

Will there finally be a unified use of the GPU on all platforms (win, mac, linux, etc) or will WebRender just be a Windows only feature for quite some time?

I have WebRender working on Linux with Intel 5500 integrated graphics. Hardware acceleration is still a bit glitchy though I'm afraid (with or without WebRender).

To enable, toggle 'layers.acceleration.force-enabled' as well as 'gfx.webrender.enabled'

edit: It's also working through my Nvidia 950m (through bumblebee), although subjectively it seems to have a little more lag this way.

Re: The web at maximum FPS: How WebRender gets rid of jank

#170
post #165
post #96

Earlier quoted context omitted.

The company was STNC Ltd. The µbrowser was called Hitchhiker. STNC was acquired by Microsoft in July 99. My understanding is that the demo at GSM World in 98 was the first time anyone had demonstrated a graphical browser on a cellphone that implemented common web standards (HTML/HTTP/TCP) rather than using a transcoding gateway (up.link or WAP style — the approach taken by Unwired Planet) The smallest device that we…

I think back in 2000 I had a phone with your browser, the Benefon Q: https://m.gsmarena.com/benefon_q-42.php It even supported black&white animated GIFs in HTML pages.

Yup! That was the most limited device we ported to. I wasn’t even aware that it was officially shipped. Benefon made nice devices, the Q was really stylish for its time. If memory served they were mostly sold in Eastern Europe and Russia.
Post reply on HN