Re: penalty for double buffering
- From: Michael Torrie <torriem chem byu edu>
- To: gtk-app-devel-list gnome org
- Subject: Re: penalty for double buffering
- Date: Sat, 13 Dec 2003 16:37:03 -0700
On Sat, 2003-12-13 at 13:43, Steven Jenkins wrote:
<snip>
Based on an earlier suggestion on this list, I disabled double buffering
with gtk_widget_set_double_buffered(drawing_area, FALSE). That reduced
the runtime dramatically, to 1.4 s.
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.
Anyway, I could be way off base here, but that's my thoughts as I read
your post.
Michael
It's fast enough with double buffering on, but I'm having a hard time
understanding, on purely theoretical grounds, how adding another memory
transfer can cause a factor of 4 degradation in performance. It's
already doing one such transfer (at least). It seems like the worst case
penalty would be a factor of 2.
This is Gentoo Linux, kernel 2.4.20, GTK+ 2.2.4, X Windows.
Any insights?
Steve
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
Michael Torrie <torriem chem byu edu>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]