[mcclim-cvs] CVS mcclim/Backends/gtkairo

dlichteblau dlichteblau at common-lisp.net
Mon Dec 25 21:34:57 UTC 2006


Update of /project/mcclim/cvsroot/mcclim/Backends/gtkairo
In directory clnet:/tmp/cvs-serv17603

Modified Files:
	port.lisp 
Log Message:

Enable double buffering for panes created with :DOUBLE-BUFFERING T only.
Gsharp already uses this method.
	
	* Backends/gtkairo/port.lisp (*DOUBLE-BUFFERING-P*): Removed.
	(MIRROR-DRAWABLE): Use PANE-DOUBLE-BUFFERING, not *d-b-p*.


--- /project/mcclim/cvsroot/mcclim/Backends/gtkairo/port.lisp	2006/12/25 19:55:11	1.14
+++ /project/mcclim/cvsroot/mcclim/Backends/gtkairo/port.lisp	2006/12/25 21:34:57	1.15
@@ -143,36 +143,23 @@
 (defmethod mirror-real-drawable ((mirror widget-mirror))
   (gtkwidget-gdkwindow (mirror-widget mirror)))
 
-(defvar *double-buffering-p*
-    #+(or win32 windows mswindows) t
-    #-(or win32 windows mswindows) nil)
-
-#+(or)
-(setf *double-buffering-p* nil)
-
 (defmethod mirror-drawable ((mirror widget-mirror))
-  (if *double-buffering-p*
-      (or (mirror-buffering-pixmap mirror)
-	  (setf (mirror-buffering-pixmap mirror)
-		(let* ((window (mirror-real-drawable mirror))
-		       (region (climi::sheet-mirror-region
-				(climi::port-lookup-sheet
-				 (mirror-port mirror)
-				 mirror)))
-		       (width (floor (bounding-rectangle-max-x region)))
-		       (height (floor (bounding-rectangle-max-y region)))
-		       (pixmap (gdk_pixmap_new window width height -1))
-		       (cr (gdk_cairo_create pixmap)))
-		  (set-antialias cr)
-		  (cairo_set_source_rgba cr
-					 1.0d0
-					 1.0d0
-					 1.0d0
-					 1.0d0)
-		  (cairo_paint cr)
-		  (cairo_destroy cr)
-		  pixmap)))
-      (mirror-real-drawable mirror)))
+  (let ((sheet (climi::port-lookup-sheet (mirror-port mirror) mirror)))
+    (if (climi::pane-double-buffering sheet)
+	(or (mirror-buffering-pixmap mirror)
+	    (setf (mirror-buffering-pixmap mirror)
+		  (let* ((window (mirror-real-drawable mirror))
+			 (region (climi::sheet-mirror-region sheet))
+			 (width (floor (bounding-rectangle-max-x region)))
+			 (height (floor (bounding-rectangle-max-y region)))
+			 (pixmap (gdk_pixmap_new window width height -1))
+			 (cr (gdk_cairo_create pixmap)))
+		    (set-antialias cr)
+		    (cairo_set_source_rgba cr 1.0d0 1.0d0 1.0d0 1.0d0)
+		    (cairo_paint cr)
+		    (cairo_destroy cr)
+		    pixmap)))
+	(mirror-real-drawable mirror))))
 
 (defun widget->sheet (widget port)
   (gethash (cffi:pointer-address widget) (widgets->sheets port)))




More information about the Mcclim-cvs mailing list