3 ms·
Do you have any good comparison numbers from Firefox or Chrome? The numbers sure seem impressive when compared to Servo but I know that Chrome has some pretty a
by trishume 11y ago
Do you have any good comparison numbers from Firefox or Chrome? The numbers sure seem impressive when compared to Servo but I know that Chrome has some pretty awesome rendering infrastructure and I'm wondering how this compares.
There was one screenshot of Firefox included but it seemed to cherry pick the longest paint and didn't offer any explanation of how to compare it or which Servo+Webrender numbers to compare it to.
- pcwalton 11y agoThere have been some really back-of-the-envelope comparisons with Skia-GL, but nothing rigorous enough to write up. That's one major reason why the numbers should be taken with a grain of salt. Servo uses the same painting backend as Firefox does: Moz2D (also known as Azure). Moz2D is itself an abstraction layer over Cairo, Skia, Core Graphics, and Direct2D. So comparing against current Servo is actually a good way to compare against Firefox and Chrome in CPU painting mode: it's using the same painting backend as both of those browsers and eliminates any noise that results from layout differences. The most important thing to note is that the overall approach is quite different from Skia-GL (Ganesh). Skia is largely an immediate mode API (with a few retained-mode-style optimizations available with SkPictures, but the overall approach is immediate). WebRender (preliminary name), however, is a fully retained mode API and has no immediate mode at all, allowing it to focus on aggressive optimizations like "strength-reducing" clipping regions and Z-buffering opaque content for improved batching. This is a tradeoff, and it'd be easy to construct pathological cases in which one API or the other performs better. What we need to find out is which wins on real-world content, and while our early results are promising (and intuitively it seems highly probable that a retained mode API will win for CSS and the DOM), there's a lot more investigation that needs to happen before it'll be a slam-dunk case.
- JoshTriplett 11y ago> Moz2D is itself an abstraction layer over Cairo, Skia, Core Graphics, and Direct2D. Out of curiosity, given that both Cairo and Skia run on all platforms Firefox does and have GPU-accelerated backends, why abstract over more than one of them rather than picking one and optimizing it for all platforms?
- pcwalton 11y agoFor Cairo, it's basically for legacy reasons, as well as looking the same as GTK+ (which I don't think is particularly important, but reasonable people can differ). Direct2D, however, has historically been the best-of-breed vector graphics engine, outclassing the rest by large margins, so it's definitely worth it to use it on Windows where available. Skia-GL has caught up quite a bit with the Ganesh effort, but Direct2D has historically been so much more mature and continues to get better with every Windows release, so I think it makes sense to keep the abstraction layer around.
- moonchrome 11y agoI hope you keep use without servo in mind at least somewhat - with the right kind of license this kind of library could be a nice foundation for a GUI framework.