diff --git a/gui-lib/info.rkt b/gui-lib/info.rkt index 726d14fd..02a8db41 100644 --- a/gui-lib/info.rkt +++ b/gui-lib/info.rkt @@ -6,7 +6,7 @@ "data-lib" ["base" #:version "6.2.900.17"] "syntax-color-lib" - ["draw-lib" #:version "1.9"] + ["draw-lib" #:version "1.10"] "snip-lib" "wxme-lib" "pict-lib" diff --git a/gui-lib/mred/private/wx/cocoa/canvas.rkt b/gui-lib/mred/private/wx/cocoa/canvas.rkt index 7f6599c6..a3a56d6f 100644 --- a/gui-lib/mred/private/wx/cocoa/canvas.rkt +++ b/gui-lib/mred/private/wx/cocoa/canvas.rkt @@ -383,7 +383,9 @@ (define/override (get-cocoa-content) content-cocoa) (define is-gl? (and (not is-combo?) (memq 'gl style))) + (define want-sync-gl? (and is-gl? gl-config (send gl-config get-sync-swap))) (define/public (can-gl?) is-gl?) + (define/public (sync-gl?) want-sync-gl?) (define dc #f) (define blits null) diff --git a/gui-lib/mred/private/wx/cocoa/dc.rkt b/gui-lib/mred/private/wx/cocoa/dc.rkt index 2a1afe13..a0a4d444 100644 --- a/gui-lib/mred/private/wx/cocoa/dc.rkt +++ b/gui-lib/mred/private/wx/cocoa/dc.rkt @@ -51,14 +51,13 @@ (define/override (do-swap-buffers) (tellv gl-ctx flushBuffer)) (super-new)))]) - ;; Disable screen sync for GL flushBuffer; otherwise, + ;; By default, disable screen sync for GL flushBuffer; otherwise, ;; flushBuffer can take around 10 msec depending on the timing ;; of event polling, and that can be bad for examples like gears. - ;; Maybe whether to sync with the screen should be a configuration - ;; option, but I can't tell the difference on my screen. - (tellv gl-ctx setValues: - #:type (_ptr i _long) 0 - forParameter: #:type _int NSOpenGLCPSwapInterval) + (unless (send canvas sync-gl?) + (tellv gl-ctx setValues: + #:type (_ptr i _long) 0 + forParameter: #:type _int NSOpenGLCPSwapInterval)) (set! gl g) g)))))