Greetings everybody! I've created a patch to get compiz (upstream about 2 hours old) away from libsvg and libsvg-cairo. Those two libraries, which are regarded as "dead meat" by their initial developer Carl Worth, are replaced with librsvg 2.14.x (e.g. part of Gnome 2.14.x) by this patch. The patch is rather small and only touches these three files: compiz/configure.ac compiz/plugins/Makefile.am compiz/plugins/cube.c I've successfully tested the typical "multiple svg-slides on top" switching back and forth. Mistyping a svg-filename is also properly handled as before. I hope to see this move into upstream in order to help compiz get rid of the old cruft that is libsvg/libsvg-cairo. BTW, to select svg-support via configure now you have to pass: --enable-librsvg now, instead of the old: --enable-libsvg-cairo I hope this change makes sense and is ok with everybody. Best regards... Mirco "MacSlow" M?ller -- email - macslow@bangang.de www - http://macslow.thepimp.net lowfat - http://macslow.thepimp.net/sponsor-it -------------- next part -------------- A non-text attachment was scrubbed... Name: svg-to-rsvg.patch Type: text/x-patch Size: 4761 bytes Desc: not available Url : http://lists.freedesktop.org/archives/compiz/attachments/20060731/66651903/svg-to-rsvg.bin
On 7/30/06, Mirco M?ller <macslow@bangang.de> wrote:> Greetings everybody! > > I've created a patch to get compiz (upstream about 2 hours old) away > from libsvg and libsvg-cairo. Those two libraries, which are regarded as > "dead meat" by their initial developer Carl Worth, are replaced with > librsvg 2.14.x (e.g. part of Gnome 2.14.x) by this patch.Great work, I was thinking of making this change, but you beat me to it - a couple of comments on the patch: - rsvg_init and rsvg_term should not be called per screen, they belong in cubeInit and cubeFini. - you need to follow the existing structure of readSvgToTexture better; call rsvg_handle_free on entry if svgHandle is non NULL to prevent leaking when changing slides, call openImageFile to look for the svg in the right paths - follow the coding style; in a few places you use a full tab instead of 4 spaces (maybe your editor is set to 4 space tabs) thanks, Kristian
Funny, I thought it is a good idea and created a patch for librsvg support two days ago aswell (even if it is just for that very very very useful slide stuff on the cube which every compiz user uses daily). ;) The only thing that kept me from posting it yet were some problems: 1. In compiz.h included from cube.c TRUE and FALSE get redefined: <pre> In file included from ../include/compiz.h:36, from cube.c:47: /usr/X11R6/include/X11/Xregion.h:60:1: warning: "TRUE" redefined In file included from /opt/gnome/lib/glib-2.0/include/glibconfig.h:9, from /opt/gnome/include/glib-2.0/glib/gtypes.h:30, from /opt/gnome/include/glib-2.0/glib/galloca.h:30, from /opt/gnome/include/glib-2.0/glib.h:30, from /opt/gnome/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h:29, from /opt/gnome/include/librsvg-2/librsvg/rsvg.h:28, from cube.c:40: /opt/gnome/include/glib-2.0/glib/gmacros.h:163:1: warning: this is the location of the previous definition In file included from ../include/compiz.h:36, from cube.c:47: /usr/X11R6/include/X11/Xregion.h:61:1: warning: "FALSE" redefined In file included from /opt/gnome/lib/glib-2.0/include/glibconfig.h:9, from /opt/gnome/include/glib-2.0/glib/gtypes.h:30, from /opt/gnome/include/glib-2.0/glib/galloca.h:30, from /opt/gnome/include/glib-2.0/glib.h:30, from /opt/gnome/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h:29, from /opt/gnome/include/librsvg-2/librsvg/rsvg.h:28, from cube.c:40: /opt/gnome/include/glib-2.0/glib/gmacros.h:159:1: warning: this is the location of the previous definition </pre> Anyone seen that with this patch too? 2. rsvg_handle_free is apparently deprecated, however using rsvg_handle_close yields in segfaults... (have librsvg 2.15.0) Anyways, great work and hopefully upstream material ;) --- Martin Szulecki