[mcclim-cvs] CVS update: mcclim/incremental-redisplay.lisp
Timothy Moore
tmoore at common-lisp.net
Fri Feb 11 11:50:23 UTC 2005
Update of /project/mcclim/cvsroot/mcclim
In directory common-lisp.net:/tmp/cvs-serv11082
Modified Files:
incremental-redisplay.lisp
Log Message:
Exit early from COMPUTE-DIFFERENCE-SET if both the old and new trees
lie outside the visible region on the screen. This fixes a problem
that I believe was introduced in 1.35: COMPUTE-DIFFERENCE-SET has to run
on all updating-output records in a tree, but the full difference
algorithm shouldn't be invoked if nothing is or was visible.
Date: Fri Feb 11 12:50:22 2005
Author: tmoore
Index: mcclim/incremental-redisplay.lisp
diff -u mcclim/incremental-redisplay.lisp:1.42 mcclim/incremental-redisplay.lisp:1.43
--- mcclim/incremental-redisplay.lisp:1.42 Tue Jan 18 10:16:30 2005
+++ mcclim/incremental-redisplay.lisp Fri Feb 11 12:50:22 2005
@@ -726,6 +726,8 @@
rect
(make-bounding-rectangle min-x min-y max-x max-y)))
+(defvar *existing-output-records* nil)
+
(defmethod compute-difference-set ((record standard-updating-output-record)
&optional (check-overlapping t)
offset-x offset-y
@@ -733,7 +735,7 @@
(declare (ignore offset-x offset-y old-offset-x old-offset-y))
(when (eq (output-record-dirty record) :clean)
(return-from compute-difference-set (values nil nil nil nil nil)))
- (let* ((existing-output-records (make-hash-table :test #'eq))
+ (let* ((existing-output-records nil)
(draws nil)
(moves (explicit-moves record))
(erases nil)
@@ -744,6 +746,13 @@
(old-children (if (slot-boundp record 'old-children)
(old-children record)
nil)))
+ (unless (or (region-intersects-region-p visible-region record)
+ (and old-children
+ (region-intersects-region-p visible-region old-children)))
+ (return-from compute-difference-set (values nil nil nil nil nil)))
+ ;; I don't feel like adding another let and indenting this huge function
+ ;; some more....
+ (setq existing-output-records (make-hash-table :test #'eq))
;; XXX This means that compute-difference-set can't be called repeatedly on
;; the same tree; ugh. On the other hand, if we don't clear explicit-moves,
;; they can hang around in the tree for later passes and cause trouble.
More information about the Mcclim-cvs
mailing list