GDK Pixbuf & librsvg

NOTE: This page is a recollection of what I've written previously. I do not guarantee it's accuracy.

GDK Pixbuf serves to dispatch parsing image files (in chunks) to various underlying libraries or for trivial cases internal implementations into raw pixel values, and maybe processing those pixels.

For SVG files like elementary uses for their icons, GDK Pixbuf dispatches to librsvg via a dynamically loaded library. librsvg (which is now a shallow C wrapper around a Rust library, though I’m not sure that’s the version I’m running) parses the input XML with some syntactic sugar, before translating it into Cairo drawing operations. For SVG filters it has to implement many of them itself, and for CSS it uses a very naive yet sufficient implementation using hashmap lookups and GNOME’s libcroco parser (though I’ve heard they’ve now switched to Servo’s CSS parser).