Re: penalty for double buffering



Michael Torrie wrote:
On Sat, 2003-12-13 at 13:43, Steven Jenkins wrote:
It seems to me that since you're drawing to the screen 50 times a second
that double buffering would buy you nothing anyway.  Double buffering is
mainly to eliminate flickering when the widget redraws or changes size. Since you're drawing yourself, with double buffering on, it seems to me
that you'd be drawing to the buffer and then to the screen.  Since
you're taking it upon yourself to handle all the invalidate events, such
a middle buffer isn't necessary (and won't do anything for you).  So
turning off the buffering returns you to the speeds you were used to
under gtk 2.0, and I don't think there would be much flickering.

The rate at which the display is updated is determined by the user. The application is a real-time data acquisition package with an interpreter for a small programming language. The graphics primitives are there if the user wants to draw plots, etc. 50 Hz is the likely uppper limit of user requirements, but higher and lower rates are allowed. Sometimes the users only update every few seconds.

But you may be right. I don't notice any flicker in the testing I've done so far. The widget can't be resized, so maybe I don't need the double buffering anyway. I'd like to be sure before I remove it.

Even if I don't need it, I'm still curious why it's so costly.

Steve




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