Re: Speed of Gdk-Pixbuf Vs. GdkRGB



Hi,

"David J. Singer" <doc deadvirgins org uk> writes:

> I'm a little confused now!  In my original posting I mentioned that
> I usually "define a backing pixmap in a 'configure' callback, draw
> the graphical content into the pixmap, then copy it to the
> drawing-area in one go in an 'expose' callback".  I guess this is
> what you are recommending I do.

That's not a backing pixmap, it's a background pixmap. So instead of
erasing your window background to the background color, the background
pixmap is being used.

> John Cupitt mentioned in a previous posting in this thread that "Gtk
> now does this for you" which suggests to me that if I'm using my own
> backing pixmap and Gtk is using *its* own backing pixmap, there's
> some redundancy...!  So what's the answer?

If GDK uses pixmaps to double-buffer your drawing (as it does in 2.x),
this backbuffer will be initialized from your background pixmap so
that any drawing ends up being drawn on top of it. Then, when all
drawing is completed, the backbuffer pixmap is blitted to the window.

> Sorry to labour the point, I'd just like to be sure I understand
> what's going on. :)

Well, you are obviously suffering from some fundamental
misunderstandings. Don't worry though, the X rendering concept is not
easy to understand and GTK+/GDK as well as all the nifty new X
extensions add quite some complexity.


Sven



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