Re: Pixmap theme, caching and gnome-pixmaps




James Henstridge <james@daa.com.au> writes:

> Would this be a solution?
> 
> In finish_load, to extract the pixmaps, use:
> 
>     gpixmap->pixmap = gdk_pixmap_ref (gdk_imlib_move_image (im));
>     gpixmap->mask = gdk_imlib_move_mask (im));
>     if (gpixmap->mask)
>         gdk_bitmap_ref (gpixmap->mask);
>     gdk_imlib_free_pixmap (gpixmap->pixmap);
> 
> This way you would have a reference to the pixmap outside of imlib's
> internal data structures, and would not get the overhead of copying the
> pixmap.

Hmmmm, this is going to leak pixmaps when pixmap caching
is turned off in imlib, because in that case, move_mask()
and move_pixmap() do steal away imlibs refcounts, I
think.

                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]