The web at maximum FPS: How WebRender gets rid of jank
hacks.mozilla.org
The web at maximum FPS: How WebRender gets rid of jank
1–10 of 212 posts
Re: The web at maximum FPS: How WebRender gets rid of jank
#2Speaking of rendering text glyphs on the GPU, there's a really clever trick(commonly called loop-blinn, from the two authors): https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch25....
You can pretty much just use the existing bezier control points from TTF as-is which is really nice.
Re: The web at maximum FPS: How WebRender gets rid of jank
#3Re: The web at maximum FPS: How WebRender gets rid of jank
#4Re: The web at maximum FPS: How WebRender gets rid of jank
#5Re: The web at maximum FPS: How WebRender gets rid of jank
#6I just love how they simplify something that's seemingly esoteric to me. I work with the web and I still have a lot to learn.
Re: The web at maximum FPS: How WebRender gets rid of jank
#7Re: The web at maximum FPS: How WebRender gets rid of jank
#8Good stuff. Speaking of rendering text glyphs on the GPU, there's a really clever trick(commonly called loop-blinn, from the two authors): https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch25.... You can pretty much just use the existing bezier control points from TTF as-is which is really nice.
Additionally, the original Loop-Blinn technique uses a constrained Delaunay triangulation to produce the mesh, which is too expensive (O(n^3) IIRC) to compute in real time. You need a faster technique, which is really tricky because it has to preserve curves (splitting when convex hulls intersect) and deal with self-intersection. Most of the work in Pathfinder 2 has gone into optimizing this step. In practice people usually use the stencil buffer to compute the fill rule, which hurts performance as it effectively computes the winding number from scratch for each pixel.
The good news is that it's quite possible to render glyphs quickly and with excellent antialiasing on the GPU using other techniques. There's lots of miscellaneous engineering work to do, but I'm pretty confident in Pathfinder's approach these days.
Re: The web at maximum FPS: How WebRender gets rid of jank
#9I imagine the render task tree also has to determine which intermediate textures to keep in the texture cache, and which ones will likely need to be redone in the next frame. That kind of optimization has to be tricky.
In practice LRU caches work pretty well.
Re: The web at maximum FPS: How WebRender gets rid of jank
#10Don't PC games use thousands of draw calls per frame?