Flickering display (using RGB buffer to write on a DrawingArea)



Hi!

I'm currently writing an application that needs to redraw a whole GtkDrawingArea when new data arrives. It needs to draw a certain number of boxes based on the incoming data. The drawing area is updated maybe 100 times per second.

I'm using a GdkRGB buffer that I update when new data arrives. Then, when the drawing is done, I invalidate the whole DrawingArea. In the DrawingArea's expose-event, I draw it on the DrawingArea's window using gdk_draw_rgb_image.
My problem is that there is a lot of flickering.

To reduce that I tried to use a server-side pixmap, that I update using the RGB buffer and draw on the DrawingArea's window during the expose-event, but that didn't solve my problem (it reduced the time needed to update the window during the expose-event though).

I tried with double buffering turned on and off, and I got the same results :(

Any ideas on what may cause this flickering and how to solve it?
Am I updating the drawing area too frequently?

Thanks!




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