gdk_pixbuf_composite and gdk_pixbuf_render_to_drawable performance



I've been writing an application to composite and display some images,
using gdk_pixbuf_composite and gdk_pixbuf_render_to_drawable. At the
moment, I'm testing the speed of things by overlaying a PNG image on a
background at the current mouse cursor location. When the mouse moves, I
re-composite and re-render the pixmap. Right now I'm re-compositing and
rendering the entire 640x480 image (with a 48x48 overlay) each time the
mouse moves. I figure I'll need to be smarter about the compositing and
rendering at some point (composite and render only changed areas, etc).

However, I've noticed that performance seems to be rather low, both on
24-bit and 16-bit displays. gdk_pixbuf_render_to_drawable is CPU
intensive. If I remove the calls to my compositing function, it still
eats all the CPU when the mouse moves across the window.

Is there a technique for speeding up gdk_pixbuf_render_to_drawable? 

Thanks,

Michael




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