[cairo-commit] src/cairo-svg-surface.c

Emmanuel Pacaud emmanuel at kemper.freedesktop.org
Fri May 5 03:59:36 PDT 2006


 src/cairo-svg-surface.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

New commits:
diff-tree 6b40ba283b6d09a7bf3bd0ec795a19b05b9bfec4 (from fb269aac0887711298241113717aa8bddecbd097)
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date:   Fri May 5 12:59:29 2006 +0200

    SVG: Remove special case for unclipped CLEAR and SOURCE in paint when
    we're in analysis mode.
    
    intersect_clip_path is not analyzed, so we can't know if we're clipped
    when we're in analysis mode.

diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 29cdfa9..96ed461 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -1300,10 +1300,7 @@ _cairo_svg_surface_paint (void		    *abs
 {
     cairo_svg_surface_t *surface = abstract_surface;
     
-    if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE && 
-	!(surface->clip_level == 0 && 
-	  (op == CAIRO_OPERATOR_CLEAR ||
-	   op == CAIRO_OPERATOR_SOURCE)))
+    if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) 
 	return _analyze_operation (surface, op, source);
 
     /* XXX: It would be nice to be able to assert this condition
@@ -1318,7 +1315,12 @@ _cairo_svg_surface_paint (void		    *abs
 
     /* Emulation of clear and source operators, when no clipping region
      * is defined. We just delete existing content of surface root node,
-     * and exit early if operator is clear. */ 
+     * and exit early if operator is clear. 
+     * XXX: optimization of SOURCE operator doesn't work, since analyze
+     * above always return FALSE. In order to make it work, we need a way
+     * to know if there's an active clipping path.
+     * Optimization of CLEAR works because of a test in paginated surface,
+     * and an optimiszation in meta surface. */ 
     if (surface->clip_level == 0 &&
 	(op == CAIRO_OPERATOR_CLEAR ||
 	 op == CAIRO_OPERATOR_SOURCE)) {


More information about the cairo-commit mailing list