[Xfce4-commits] [xfce/xfdesktop] 01/01: Don't use cairo_surface_create_similar_image (Bug #11566)

noreply at xfce.org noreply at xfce.org
Sun Feb 22 13:47:37 CET 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit 1255ded3ad7483588d879dd35d992a746b615335
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Sat Feb 21 20:23:01 2015 +0300

    Don't use cairo_surface_create_similar_image (Bug #11566)
    
    cairo_surface_create_similar_image was added in cairo 1.12,
    and we list only cairo 1.6 as a requirement. A configure check
    was added for cairo, and use cairo_image_surface_create.
---
 README             |    1 +
 configure.ac.in    |    2 ++
 src/gtkcairoblur.c |    7 +++----
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/README b/README
index 14c1529..f27d37c 100644
--- a/README
+++ b/README
@@ -27,6 +27,7 @@ MINIMUM REQUIREMENTS
 * garcon 0.1.2 (optional; required for apps menu)
 * thunar 1.2 (optional; required for file icons)
 * tumbler 1.6 (optional; enables thumbnail previews for file icons)
+* cairo 1.6
 
 
 HIDDEN CUSTOMISATIONS
diff --git a/configure.ac.in b/configure.ac.in
index 4af9b47..1867904 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -25,6 +25,7 @@ m4_define([dbus_minimum_version], [0.84])
 m4_define([wnck_minimum_version], [2.30])
 m4_define([intltool_minimum_version], [0.31])
 m4_define([xfconf_minimum_version], [4.10.0])
+m4_define([cairo_minimum_version], [1.6])
 
 dnl define a short version string for xfdesktop
 m4_append([xfdesktop_version_short], ["])
@@ -102,6 +103,7 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1],
 XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [wnck_minimum_version])
 XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [xfconf_minimum_version])
 XDT_CHECK_PACKAGE([LIBEXO], [exo-1], [exo_minimum_version])
+XDT_CHECK_PACKAGE([CAIRO], [cairo], [cairo_minimum_version])
 
 XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [glib_minimum_version], [gio-unix],
     [gio-unix, for special treatment of mount points on UNIX])
diff --git a/src/gtkcairoblur.c b/src/gtkcairoblur.c
index 1a12830..8d57120 100644
--- a/src/gtkcairoblur.c
+++ b/src/gtkcairoblur.c
@@ -212,10 +212,9 @@ gtk_css_shadow_value_start_drawing (cairo_t *cr, gdouble radius)
   clip_radius = _gtk_cairo_blur_compute_pixels (radius);
 
   /* Create a larger surface to center the blur. */
-  surface = cairo_surface_create_similar_image (cairo_get_target (cr),
-                                                CAIRO_FORMAT_A8,
-                                                clip_rect.width + 2 * clip_radius,
-                                                clip_rect.height + 2 * clip_radius);
+  surface = cairo_image_surface_create (CAIRO_FORMAT_A8,
+                                        clip_rect.width + 2 * clip_radius,
+                                        clip_rect.height + 2 * clip_radius);
   cairo_surface_set_device_offset (surface, clip_radius - clip_rect.x, clip_radius - clip_rect.y);
   blur_cr = cairo_create (surface);
   cairo_set_user_data (blur_cr, &original_cr_key, cairo_reference (cr), (cairo_destroy_func_t) cairo_destroy);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list