4 ms·
Not exactly. SVG syntax describes a scene, it does not draw on screen directly. When you animate an SVG image, you update the DOM. The browser then needs to pa
by steadicat 16y ago
Not exactly. SVG syntax describes a scene, it does not draw on screen directly.
When you animate an SVG image, you update the DOM. The browser then needs to parse the DOM (attributes) again, then clear the screen and draw each element again. This is a lot more work than just mapping the drawing primitives of Canvas to the lower-level GPU functions.
Check this presentation for the two technologies compared in terms of how much work is required for animation: http://www.slideshare.net/madrobby/i-cant-believe-its-not-flash http://www.slideshare.net/madrobby/i-cant-believe-its-not-fl...
- arethuza 16y agoAh OK - good point I guess it's good to have the choice though - for some things Canvas looks a good choice, for others SVG is better.