https://hacks.mozilla.org/2017/10/the-whole-web-at-maximum-f...
It's a shame that Patrick Walton didn't get a chance to finish his work on the Pathfinder GPU renderer.
>Pathfinder 3 is a fast, practical, GPU-based rasterizer for fonts and vector graphics using OpenGL 3.0+, OpenGL ES 3.0+, WebGL 2, and Metal.
GPUs are good for massively parallel tasks, for example, shading every individual pixel on a 3D rendered scene, which is what they are designed for, bruteforcing hash functions, as it is done in cryptocurrency mining, or multiplying large matrices, as it is done in deep learning.
But most of what a browser does is not massively parallel. JS is mostly single-thread, and layout, parsing HTML, or managing network connections may benefit from a bit of parallelism but we are not talking about thousands of simultaneous operations with no interdependence. And for that, GPUs suck, they don't have the caching, branch prediction, synchronization, etc... abilities of a CPU, and attempting to do that on a GPU will only bring it down while its overpowered math units will be idling.
Last I checked this was going to be a sandbox for Rust ideas with no intention of Gecko bring dropped by Firefox.
It would be cool if it could at least be a "secure" window with heavy restrictions on add-ons etc. Not full featured, maybe not even much hardware acceleration. Just a single window that is super hardened.
Think of a GPU this way: If you could reasonably launch a thousand threads on the CPU and get a benefit from it—i.e., essentially, you have tens of thousands of largely independent work chunks (or more)—your problem might be well-suited to a GPU. A large web page contains a couple thousand DOM elements, and many of them depend on each other wrt. style, so it's not a good fit. (Stylo is parallelized, so it is capable of using a multicore CPU, but there's no way it can get a reasonable gain from 1000 cores.) Layout is also nontrivial to parallelize.
However, paint is a different beast. In many cases, you can do per-pixel parallel work. So various forms of font work, line/shape rendering, compositing/blending, scrolling, video decoding… that's where the GPU is useful.
Maybe a better prediction would be for the CPU/GPU/MPU/APU/xPU distinction to become less relevant since processors will gain those capabilities? A future where processors come in chiplet-based packages with a few generic cores and some more tailored to massively parallel matrix processing maybe?