3 ms·
The main differences, as I explained in another comment, are that (a) the API is fully retained-mode, not immediate-mode; (b) CSS is rendered directly without g
by pcwalton 11y ago
The main differences, as I explained in another comment, are that (a) the API is fully retained-mode, not immediate-mode; (b) CSS is rendered directly without going through a vector graphics API first. The former feature allows us to achieve very aggressive batching and GL state optimizations, since we always know we have the entire draw list available to us. The latter feature has two benefits: (1) it makes all these optimizations much easier to do, since there are no vector paths involved and clipping regions are much simpler; (2) it allows us to skip all the difficult, slow stuff that arbitrary paths require (CPU path rendering, complex tessellation, stencil buffer clipping, etc.) in favor of simple hand-optimized code that renders CSS directly.