From dfc661f28f6cdd253a6c3724e99e328bb676d61e Mon Sep 17 00:00:00 2001 From: Andy Wood Date: Thu, 29 Jan 2015 18:24:10 +0000 Subject: [PATCH] Just use cairo_image_surface_create rather than cairo_surface_create_similar_image which was introduced in cairo 1.12. Unfortunately the cairo distributed with GTK+, used in the Windows build, is only 1.10. Using the similar_image version offers backends the chance to be more efficient, but the alternative used here is used as a fallback in the cairo code anyway. --- src/CanvasRenderingContext2d.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CanvasRenderingContext2d.cc b/src/CanvasRenderingContext2d.cc index dfc55ee..74b5924 100755 --- a/src/CanvasRenderingContext2d.cc +++ b/src/CanvasRenderingContext2d.cc @@ -372,7 +372,7 @@ Context2d::shadow(void (fn)(cairo_t *cr)) { cairo_user_to_device_distance(_context, &dx, &dy); int pad = state->shadowBlur * 2; cairo_surface_t *surface = cairo_get_group_target(_context); - cairo_surface_t *shadow_surface = cairo_surface_create_similar_image(surface, + cairo_surface_t *shadow_surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, dx + 2 * pad, dy + 2 * pad);