Re: Speed of Gdk-Pixbuf Vs. GdkRGB



On Wednesday 21 April 2004 6:13 pm, John Cupitt wrote:
>
> They are equivalent (AFAIK). You only need the lower-level stuff if you
> want to avoid loading the whole image into memory

OK. That's interesting. I kinda assumed GdkRGB would be loads faster 
because it has a much "lower-level" feel to it...   I was using it to display
simple (widget-type) animations by manually loading all the frames into memory 
then calling up each frame using 'gdk_draw_rgb_image' with the required 
offset.. The prospect of using the built-in animation stuff seems tempting,
but only if it is *at least* as quick as my current method! :)

> Before calling your expose callback, gtk allocates an offscreen pixmap the
> size of the expose area, redirects gdk_* to that off screen pixmap, calls
> your expose handler, then copies the offscreen pixmap to the display.

So I just use the standard gdk_draw_xxx type stuff in the expose callback
and that's it?   Interesting.   

> The downside is you must only ever paint in the expose handler.

That's the catch. It's usually far more useful to be able to assemble the backing 
pixmap piece by piece, then just allow it to get "automatically" updated (as it 
were) when an expose event occurs...  So I guess in this case I need to 
stick to my old method of doing it?  Right?

-- 
David J. Singer
doc deadvirgins org uk
"Time flies like an arrow, fruit flies like a banana"




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