This commit is contained in:
Jay McCarthy 2018-01-03 18:02:55 -05:00
parent 9f70298f71
commit 07e8f3382f
1 changed files with 5 additions and 6 deletions

View File

@ -149,15 +149,14 @@
(struct-define output-buffer buf)
(set! cells (maybe-make-cells cells new-rows new-cols)))
(define (buffer-start! buf draw-rows draw-cols)
(struct-define output-buffer buf)
(buffer-resize! buf draw-rows draw-cols)
(define cs (output-buffer-cells buf))
(clear-cells! cs)
(values draw-rows draw-cols (draw-cell! cs)))
(clear-cells! cells)
(values draw-rows draw-cols (draw-cell! cells)))
(define (buffer-commit! buf)
(define op (output-buffer-op buf))
(define cells (cells-vec (output-buffer-cells buf)))
(struct-define output-buffer buf)
(for/fold ([last-s 'normal] [last-f #f] [last-b #f])
([row (in-vector cells)])
([row (in-vector (cells-vec cells))])
(begin0
(for/fold ([last-s last-s] [last-f last-f] [last-b last-b])
([oc (in-vector row)])