[sapwood] and simplify the code with the new function



commit 7240dfe83d061eb86f285ef6bd3f24d20f8fc074
Author: Sven Herzberg <herzi gnome-de org>
Date:   Fri Aug 13 13:17:52 2010 +0200

    and simplify the code with the new function
    
    * engine/sapwood-pixmap.c: use the new function instead of handling the
      ownership manually

 engine/sapwood-pixmap.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/engine/sapwood-pixmap.c b/engine/sapwood-pixmap.c
index 1be6120..6c4cf0e 100644
--- a/engine/sapwood-pixmap.c
+++ b/engine/sapwood-pixmap.c
@@ -515,12 +515,7 @@ sapwood_pixmap_render_rects (SapwoodPixmap* self,
   if (need_tmp_mask)
     {
       GdkPixmap* tmp_mask = gdk_pixmap_new (NULL, tmp_width, tmp_height, 1);
-      cairo_t* mask_cr = gdk_cairo_create (tmp_mask);
-
-      mask_surface = cairo_surface_reference (cairo_get_target (mask_cr));
-      cairo_surface_set_user_data (mask_surface, &sapwood_pixmap_owner,
-                                   tmp_mask, (GFreeFunc) g_object_unref);
-      cairo_destroy (mask_cr);
+      mask_surface = sapwood_create_surface_and_unref (tmp_mask);
     }
 
   tmp_cr = cairo_create (tmp);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]