2 ms·
> 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 Fir
by 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.