[lasem] svg_view: don't do filtering when clipping is in progress.



commit d0bf3f9c98241a3050c886954b3395aff5270b5a
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Tue Oct 16 21:29:34 2012 +0200

    svg_view: don't do filtering when clipping is in progress.
    
    Filter code will create a new subsurface, when we want to clip with
    the path of the cli-path element.
    
    Fix rendering of misc/dialog-question.svg (of gnome-icon-theme).

 src/lsmsvgview.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/lsmsvgview.c b/src/lsmsvgview.c
index e358c27..382991e 100644
--- a/src/lsmsvgview.c
+++ b/src/lsmsvgview.c
@@ -2306,7 +2306,10 @@ lsm_svg_view_push_composition (LsmSvgView *view, LsmSvgStyle *style)
 		lsm_svg_view_push_mask (view);
 	}
 
-	if (do_filter) {
+	/* Don't do filtering during a clipping operation, as filter will
+	 * create a new subsurface, where clipping should occur with the path
+	 * of the clip-path element. */ 
+	if (do_filter && !view->is_clipping) {
 		lsm_debug_render ("[LsmSvgView::push_style] Start filter '%s'", style->filter->value);
 		lsm_svg_view_push_filter (view);
 	}
@@ -2338,7 +2341,10 @@ void lsm_svg_view_pop_composition (LsmSvgView *view)
 	do_mask = (g_strcmp0 (view->style->mask->value, "none") != 0);
 	do_filter = (g_strcmp0 (view->style->filter->value, "none") != 0);
 
-	if (do_filter)
+	/* Don't do filtering during a clipping operation, as filter will
+	 * create a new subsurface, where clipping should occur with the path
+	 * of the clip-path element. */ 
+	if (do_filter && !view->is_clipping)
 		lsm_svg_view_pop_filter (view);
 
 	if (do_mask)



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