diff options
-rw-r--r-- | chickadee/graphics/engine.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chickadee/graphics/engine.scm b/chickadee/graphics/engine.scm index a007c6e..2bc6463 100644 --- a/chickadee/graphics/engine.scm +++ b/chickadee/graphics/engine.scm @@ -287,9 +287,16 @@ (engine (current-graphics-engine))) (hashq-set! (graphics-engine-variables engine) var value)) + +;; HACK: This *should* be in graphics-engine-commit! but for some +;; reason Guile's compiler is generating inefficient bytecode that +;; allocates a closure even though it should be completely +;; unnecessary. Defining this procedure at the top-level fixes it. +(define (maybe-bind _id state) + (graphics-state-bind-maybe state)) + (define (graphics-engine-commit!) - (array-list-for-each (lambda (id state) - (graphics-state-bind-maybe state)) + (array-list-for-each maybe-bind (graphics-engine-states (current-graphics-engine)))) (define* (graphics-engine-guard! obj #:optional |