Hi,

I recall from when PCB was ported to GTK, it was noted to be far slower
than the original Xaw? version. I recalled a site which mentioned most
GTK widgets are double buffered by default. I wounder if this might be
part of the cause.

I have tried this patch:

Index: gui-top-window.c
===================================================================
RCS file: /cvsroot/pcb/pcb/src/hid/gtk/gui-top-window.c,v
retrieving revision 1.34
diff -U3 -p -r1.34 gui-top-window.c
--- gui-top-window.c    19 Oct 2006 22:42:56 -0000      1.34
+++ gui-top-window.c    30 Nov 2006 19:56:14 -0000
@@ -3427,6 +3427,9 @@ ghid_build_pcb_top_window (void)
    */
   GTK_WIDGET_SET_FLAGS (gport->drawing_area, GTK_CAN_FOCUS);
 
+  /* Turn off double buffering */
+  GTK_WIDGET_UNSET_FLAGS (gport->drawing_area, GTK_DOUBLE_BUFFERED);
+
   gtk_container_add (GTK_CONTAINER (viewport), gport->drawing_area);
 
   ghidgui->v_adjustment = gtk_adjustment_new (0.0, 0.0, 100.0,


I've not noticed any obvious improvement in performance, nor any obvious
redraw artifacts (I presume PCB double buffers internally, however I've
not looked! The PC I'm using is quite fast though, and I never found GTK
PCB slow. Is it useful for someone with a slower machine available to
see if this helps?

(Just checking the code, I think I see a backing pixmap being used apart
from the crosshair. The crosshair might be more prone to drawing flicker
now. I'd be interested to hear what people have to say if they try the
patch).


Regards

Peter Clifton



_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to