Hacker News new | past | comments | ask | show | jobs | submit login

Chrome's approach is fundamentally different: it's the main difference I was describing at the beginning of the talk, by contrasting Chrome's immediate mode approach with WebRender's retained mode. (By the way, Safari, IE 9 and up, and Firefox on Vista and up all use immediate mode GPU painting backends like Chrome does.)

Incidentally, I don't deserve the lion's share of the credit here. Veteran game developer Glenn Watson is really the brains behind the project—my role has mostly consisted of picking off a few scattered features and optimizations to implement.




Great work guys. Will help push the web forward!

Vulkan/Android coming anytime soon?


Android is working already. As for Vulkan, I answer that at the end of the talk, but the basic story is that we're Vulkan-ready architecturally, but nobody has done the port yet.


Awesome. What's the perf like on Android? Is there an apk to try?


Have you been able to make use of hardware accelerated path rendering? Like the stuff Mark Kilgard is working on?

(I mean, "painting on the GPU" doesn't say how you use the GPU, and I've been wondering if there's anything new happening in path rendering land after seeing a video on Kilgard's work years ago)


We actually aren't doing any path rendering yet; CSS as used on the Web is all boxes and triangles, aside from glyphs. One of the neat things about WebRender is the observation that triangles are pretty much all you need for CSS.

A future extension to support SVG and glyphs on the GPU would be pretty interesting though!


I just got through the part of the talk where you mentioned all of this :)

BTW, are you aware of the Halide language? Might be useful for writing those CPU fallbacks.

http://halide-lang.org/


I'm actually very glad to hear that. I've been working on (read: designing, not yet implementing) a GUI framework for Rust, and was hoping to get away without an external 2D rendering library like cairo. And if CSS can be reduced to those, my comparatively limited system (no overlapping areas, only rectangular widgets, only inherited data is position and base color) should be able to handle it.

The drawing abstraction is actually my current big hurdle, and I hadn't thought of looking at how CSS is rendered yet. So, thanks for that hint!


On Linux at least, NVIDIA's drivers do support some acceleration for glyph rendering and other 2D operations through the X RENDER extension. It's not really going to help with SVG rendering, but it's great for boxes, triangles, and glyphs, as well as blitting and compositing which covers most of what browsers do with HTML and CSS


XRENDER basically provides a subset of OpenGL which is insufficient to describe all of CSS and not particularly tailored to modern GPUs. The extra features it has, like trapezoids and blend modes, are easy to implement in regular old OpenGL. Additionally, it's effectively Linux-only and has spotty driver support. I don't see any reason to use it.


It seems like a waste to tie new software to X when Wayland is just around the corner.


It's been 7 years since OpenVG and not much has changed. I keep hoping one of these browser rendering technologies would emerge as an open framework for path rendering on mobile, but no dice so far. The benefits are massive — an order of magnitude improvement compared to CoreGraphics in my app — but the big players seem to be making their own technology and keeping it private.


pcwalton, are you able to share the rotating 3D test you used in the talk? I'm building Servo now and would love to have a play with it.





Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: