anchor.diff:    (with-simple-restart (abort "Close Starfield")
       (catch 'quit
         (let ((fifo (mezzano.supervisor:make-fifo 50))
  -            (stars (make-stars 100)))
  +            (stars (make-stars 100))
  +            (starfield (make-instance 'starfield)))
           (mezzano.gui.compositor:with-window (window fifo 0 0 :initial-z-order :top :layer :top)
             (mezzano.gui.compositor:subscribe-notification window :screen-geometry)
             (mezzano.gui.compositor:set-window-data window :cursor :none)
  +          (setf (starfield-window starfield) window
  +                (starfield-backbuffer starfield) (mezzano.gui:make-surface 0 0))
             (loop
                (let ((start-time (get-internal-run-time))
                      (framebuffer (mezzano.gui.compositor:window-buffer window))
  +                   (backbuffer (starfield-backbuffer starfield))
                      (width (mezzano.gui.compositor:width window))
                      (height (mezzano.gui.compositor:height window)))
  -               (render-starfield stars framebuffer 0 0 width height)
  +               (render-starfield stars backbuffer 0 0 width height)
  +               (mezzano.gui:bitblt :set width height
  +                                   backbuffer 0 0
  +                                   framebuffer 0 0)
                  (mezzano.gui.compositor:damage-window window 0 0 width height)
                  (loop
                     (let ((evt (mezzano.supervisor:fifo-pop fifo nil)))
                       (when (not evt) (return))
  -                    (dispatch-event window evt)))
  +                    (dispatch-event starfield evt)))
                  (sleep (/ 1 30))
                  (let ((dt (/ (- (get-internal-run-time) start-time)
                               (float internal-time-units-per-second 0.0d0))))
  
positive.code:   (:export #:spawn))
  
  (in-package :mezzano.gui.starfield)
  
  (defconstant +white+ (mezzano.gui:make-colour 1.0 1.0 1.0))
  (defconstant +black+ (mezzano.gui:make-colour 0.0 0.0 0.0))
  
negative.code:      for star across stars
       do (render-star star framebuffer x y width height)))
  
  (defparameter *star-speed* 1)
  
  (defun update-starfield (stars dt)
    (loop
  