I've been thninking about this issue for some while now as well, and I've
written (in gtkmm straight, so i didn't attempt to provide patches yet) a
CairoImageSurface cellrenderer, and a few miscellaneous widgets which render
directly a Cairo ImageSurface to a drawable instead of doing roundtrips. The
renderer is a drop-in replacement for CellRendererPixbuf, it also has a
pixbuf property, in which case it will render just that, otherwise it's
possible to make it render imagesurface directly, or construct some in a
cell data function.

There is however one more problem which wasn't discussed yet in this thread:
Widget insensitivity and the gtk style engines. The Pixbuf cellrenderer uses
the gtk style engine to render its state when insensitive. It also uses a
"gtkcellrendererpixbuf" detail to the style engine, and (thinking of Aaron
Bockover's blog post about "Suboptimal Theming") possibly checks if the
"widget" arg passed to it is a TreeView as well (i didn't check).

My widgets fall back to rendering a Pixbuf version of the Cairo surface when
insensitive, which is of suboptimal indeed.

-- Milosz

On 10 Oct 2007 21:46:38 +0200, Soeren Sandmann <[EMAIL PROTECTED]> wrote:
>
> "BJörn Lindqvist" <[EMAIL PROTECTED]> writes:
>
> > Incidentally, blitting pixbufs is slower than it has to be because its
> > format rarely matches the X11 server which uses either xRGB32 or
> > ARGB32.
>
> I don't disagree with anything else you say, but this "performance
> issue" is really a non-issue. We are talking about data on the client
> here, so there is no way the X server can hardware accelerate those
> blits [1]. This means we are back to software in both cases, and in
> that case the difference between convert_and_copy_data() and
> copy_data() is completely negligble.
>
>
> Soren
>
>
> [1] Some day, maybe, we'll be able to DMA directly out of client
> memory, but this will require lots of work in both the kernel and the
> X server. We are still far away from that being possible.
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to