From af937a030aa83ad6c3b9df7fe0bd67186964116d Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Mon, 12 Mar 2018 09:21:26 -0700 Subject: [PATCH] cairo: Undo previous; do NOT use glib. Require colors (no names). --- src/cairo/cairo.scm | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/cairo/cairo.scm b/src/cairo/cairo.scm index e6bd01114..79da4f4d2 100644 --- a/src/cairo/cairo.scm +++ b/src/cairo/cairo.scm @@ -124,12 +124,11 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (cairo-pattern-add-color-stop pattern offset color) (guarantee-cairo-pattern pattern 'cairo-pattern-add-color-stop) - (let ((c (if (color? color) - color - (with-glib-lock - (lambda () (->color color 'cairo-pattern-add-color-stop)))))) - (C-call "cairo_pattern_add_color_stop_rgba" pattern (->flonum offset) - (color-red c) (color-green c) (color-blue c) (color-alpha c)))) + (guarantee-color color 'cairo-pattern-add-color-stop) + (C-call "cairo_pattern_add_color_stop_rgba" + pattern (->flonum offset) + (color-red color) (color-green color) (color-blue color) + (color-alpha color))) (define (cairo-create surface) (guarantee-cairo-surface surface 'cairo-create) @@ -186,12 +185,10 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (cairo-set-source-color cairo color) (guarantee-cairo cairo 'cairo-set-source-color) - (let ((c (if (color? color) - color - (with-glib-lock - (lambda () (->color color 'cairo-set-source-color)))))) - (C-call "cairo_set_source_rgba" cairo - (color-red c) (color-green c) (color-blue c) (color-alpha c)))) + (guarantee-color color 'cairo-set-source-color) + (C-call "cairo_set_source_rgba" cairo + (color-red color) (color-green color) (color-blue color) + (color-alpha color))) (define (cairo-set-source cairo pattern) (guarantee-cairo cairo 'cairo-set-source) -- 2.25.1