[sapwood] add a cairo_surface_t for the mask
- From: Sven Herzberg <herzi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sapwood] add a cairo_surface_t for the mask
- Date: Fri, 13 Aug 2010 11:40:56 +0000 (UTC)
commit fd55b2841c8ffc9bd737c1eefd387d1d51cc6480
Author: Sven Herzberg <herzi gnome-de org>
Date: Fri Aug 13 12:03:57 2010 +0200
add a cairo_surface_t for the mask
* engine/sapwood-pixmap.c: in order to slowly migrate from the GdkBitmap
for the temporary mask towards a cairo_surface_t
engine/sapwood-pixmap.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/engine/sapwood-pixmap.c b/engine/sapwood-pixmap.c
index 3b1db39..92c6467 100644
--- a/engine/sapwood-pixmap.c
+++ b/engine/sapwood-pixmap.c
@@ -471,6 +471,7 @@ sapwood_pixmap_render_rects (SapwoodPixmap* self,
gint n_rect,
SapwoodRect *rect)
{
+ cairo_surface_t* mask_surface = NULL;
cairo_surface_t* tmp;
gboolean need_tmp_mask = FALSE;
GdkPixmap * tmp_mask = NULL;
@@ -519,6 +520,8 @@ sapwood_pixmap_render_rects (SapwoodPixmap* self,
mask_cr = gdk_cairo_create (tmp_mask);
cairo_set_operator (mask_cr, CAIRO_OPERATOR_CLEAR);
cairo_paint (mask_cr);
+
+ mask_surface = cairo_surface_reference (cairo_get_target (mask_cr));
}
tmp_cr = cairo_create (tmp);
@@ -573,6 +576,10 @@ sapwood_pixmap_render_rects (SapwoodPixmap* self,
/* clean up */
cairo_destroy (cr);
+ if (mask_surface)
+ {
+ cairo_surface_destroy (mask_surface);
+ }
if (mask_cr)
cairo_destroy (mask_cr);
if (tmp_mask)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]