[cairo-commit] 2 commits - src/cairo-xcb-private.h src/cairo-xcb-surface.c src/cairo-xcb-surface-cairo.c src/cairo-xcb-surface-render.c src/Makefile.sources

Uli Schlachter psychon at kemper.freedesktop.org
Mon Sep 24 00:48:26 PDT 2012


 src/Makefile.sources           |    1 
 src/cairo-xcb-private.h        |  103 +++----------
 src/cairo-xcb-surface-cairo.c  |   94 ------------
 src/cairo-xcb-surface-render.c |   75 +++++-----
 src/cairo-xcb-surface.c        |  307 +++++++++++++++++------------------------
 5 files changed, 196 insertions(+), 384 deletions(-)

New commits:
commit de31018bdd1cc78fd54cf9fd7b220117008c33a8
Author: Uli Schlachter <psychon at znc.in>
Date:   Sat Sep 15 15:43:16 2012 +0200

    xcb: Switch to compositor architecture
    
    This commit removes the hand-written code in cairo-xcb-surface.c and instead
    makes use of cairo_compositor_t. Surprisingly, this doesn't break a single test
    case. :-)
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h
index 35b50ad..f6cb34e 100644
--- a/src/cairo-xcb-private.h
+++ b/src/cairo-xcb-private.h
@@ -386,49 +386,38 @@ _cairo_xcb_surface_get_extents (void *abstract_surface,
 				cairo_rectangle_int_t *extents);
 
 cairo_private cairo_int_status_t
-_cairo_xcb_surface_render_paint (cairo_xcb_surface_t	*surface,
-				 cairo_operator_t	 op,
-				 const cairo_pattern_t	*source,
-				 cairo_composite_rectangles_t *composite);
+_cairo_xcb_render_compositor_paint (const cairo_compositor_t     *compositor,
+				    cairo_composite_rectangles_t *extents);
 
 cairo_private cairo_int_status_t
-_cairo_xcb_surface_render_mask (cairo_xcb_surface_t	*surface,
-				cairo_operator_t		 op,
-				const cairo_pattern_t	*source,
-				const cairo_pattern_t	*mask,
-				cairo_composite_rectangles_t *composite);
+_cairo_xcb_render_compositor_mask (const cairo_compositor_t     *compositor,
+				   cairo_composite_rectangles_t *extents);
 
 cairo_private cairo_int_status_t
-_cairo_xcb_surface_render_stroke (cairo_xcb_surface_t		*surface,
-				  cairo_operator_t		 op,
-				  const cairo_pattern_t		*source,
-				  const cairo_path_fixed_t	*path,
-				  const cairo_stroke_style_t	*style,
-				  const cairo_matrix_t		*ctm,
-				  const cairo_matrix_t		*ctm_inverse,
-				  double			 tolerance,
-				  cairo_antialias_t		 antialias,
-				  cairo_composite_rectangles_t *composite);
+_cairo_xcb_render_compositor_stroke (const cairo_compositor_t     *compositor,
+				     cairo_composite_rectangles_t *extents,
+				     const cairo_path_fixed_t     *path,
+				     const cairo_stroke_style_t   *style,
+				     const cairo_matrix_t         *ctm,
+				     const cairo_matrix_t         *ctm_inverse,
+				     double                        tolerance,
+				     cairo_antialias_t             antialias);
 
 cairo_private cairo_int_status_t
-_cairo_xcb_surface_render_fill (cairo_xcb_surface_t	*surface,
-				cairo_operator_t	 op,
-				const cairo_pattern_t	*source,
-				const cairo_path_fixed_t*path,
-				cairo_fill_rule_t	 fill_rule,
-				double			 tolerance,
-				cairo_antialias_t	 antialias,
-				cairo_composite_rectangles_t *composite);
+_cairo_xcb_render_compositor_fill (const cairo_compositor_t     *compositor,
+				   cairo_composite_rectangles_t *extents,
+				   const cairo_path_fixed_t     *path,
+				   cairo_fill_rule_t             fill_rule,
+				   double                        tolerance,
+				   cairo_antialias_t             antialias);
 
 cairo_private cairo_int_status_t
-_cairo_xcb_surface_render_glyphs (cairo_xcb_surface_t	*surface,
-				  cairo_operator_t		 op,
-				  const cairo_pattern_t	*source,
-				  cairo_scaled_font_t	*scaled_font,
-				  cairo_glyph_t		*glyphs,
-				  int			 num_glyphs,
-				  cairo_composite_rectangles_t *composite,
-				  cairo_bool_t overlap);
+_cairo_xcb_render_compositor_glyphs (const cairo_compositor_t     *compositor,
+				     cairo_composite_rectangles_t *extents,
+				     cairo_scaled_font_t          *scaled_font,
+				     cairo_glyph_t                *glyphs,
+				     int                           num_glyphs,
+				     cairo_bool_t                  overlap);
 cairo_private void
 _cairo_xcb_surface_scaled_font_fini (cairo_scaled_font_t *scaled_font);
 
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index adbf0df..959d380 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -3505,11 +3505,12 @@ _composite_opacity_boxes (void				*closure,
 /* high level rasteriser -> compositor */
 
 cairo_int_status_t
-_cairo_xcb_surface_render_paint (cairo_xcb_surface_t	*surface,
-				 cairo_operator_t	 op,
-				 const cairo_pattern_t	*source,
-				 cairo_composite_rectangles_t *composite)
+_cairo_xcb_render_compositor_paint (const cairo_compositor_t     *compositor,
+				    cairo_composite_rectangles_t *composite)
 {
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) composite->surface;
+    cairo_operator_t op = composite->op;
+    cairo_pattern_t *source = &composite->source_pattern.base;
     cairo_boxes_t boxes;
     cairo_status_t status;
 
@@ -3542,12 +3543,13 @@ _cairo_xcb_surface_render_paint (cairo_xcb_surface_t	*surface,
 }
 
 cairo_int_status_t
-_cairo_xcb_surface_render_mask (cairo_xcb_surface_t	*surface,
-				cairo_operator_t	 op,
-				const cairo_pattern_t	*source,
-				const cairo_pattern_t	*mask,
-				cairo_composite_rectangles_t *composite)
+_cairo_xcb_render_compositor_mask (const cairo_compositor_t     *compositor,
+				   cairo_composite_rectangles_t *composite)
 {
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) composite->surface;
+    cairo_operator_t op = composite->op;
+    cairo_pattern_t *source = &composite->source_pattern.base;
+    cairo_pattern_t *mask = &composite->mask_pattern.base;
     cairo_status_t status;
 
     if (unlikely (! _operator_is_supported (surface->connection->flags, op)))
@@ -3673,17 +3675,18 @@ _cairo_xcb_surface_render_stroke_via_mask (cairo_xcb_surface_t		*dst,
 }
 
 cairo_int_status_t
-_cairo_xcb_surface_render_stroke (cairo_xcb_surface_t	*surface,
-				  cairo_operator_t	 op,
-				  const cairo_pattern_t	*source,
-				  const cairo_path_fixed_t	*path,
-				  const cairo_stroke_style_t	*style,
-				  const cairo_matrix_t	*ctm,
-				  const cairo_matrix_t	*ctm_inverse,
-				  double		 tolerance,
-				  cairo_antialias_t	 antialias,
-				  cairo_composite_rectangles_t *composite)
+_cairo_xcb_render_compositor_stroke (const cairo_compositor_t     *compositor,
+				     cairo_composite_rectangles_t *composite,
+				     const cairo_path_fixed_t     *path,
+				     const cairo_stroke_style_t   *style,
+				     const cairo_matrix_t         *ctm,
+				     const cairo_matrix_t         *ctm_inverse,
+				     double                        tolerance,
+				     cairo_antialias_t             antialias)
 {
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) composite->surface;
+    cairo_operator_t op = composite->op;
+    cairo_pattern_t *source = &composite->source_pattern.base;
     cairo_int_status_t status;
 
     if (unlikely (! _operator_is_supported (surface->connection->flags, op)))
@@ -3813,15 +3816,16 @@ _cairo_xcb_surface_render_fill_via_mask (cairo_xcb_surface_t	*dst,
 }
 
 cairo_int_status_t
-_cairo_xcb_surface_render_fill (cairo_xcb_surface_t	*surface,
-			       cairo_operator_t		 op,
-			       const cairo_pattern_t	*source,
-			       const cairo_path_fixed_t	*path,
-			       cairo_fill_rule_t	 fill_rule,
-			       double			 tolerance,
-			       cairo_antialias_t	 antialias,
-			       cairo_composite_rectangles_t *composite)
+_cairo_xcb_render_compositor_fill (const cairo_compositor_t     *compositor,
+				   cairo_composite_rectangles_t *composite,
+				   const cairo_path_fixed_t     *path,
+				   cairo_fill_rule_t             fill_rule,
+				   double                        tolerance,
+				   cairo_antialias_t             antialias)
 {
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) composite->surface;
+    cairo_operator_t op = composite->op;
+    cairo_pattern_t *source = &composite->source_pattern.base;
     cairo_int_status_t status;
 
     if (unlikely (! _operator_is_supported (surface->connection->flags, op)))
@@ -4802,15 +4806,16 @@ _composite_glyphs (void				*closure,
 }
 
 cairo_int_status_t
-_cairo_xcb_surface_render_glyphs (cairo_xcb_surface_t	*surface,
-				  cairo_operator_t	 op,
-				  const cairo_pattern_t	*source,
-				  cairo_scaled_font_t	*scaled_font,
-				  cairo_glyph_t		*glyphs,
-				  int			 num_glyphs,
-				  cairo_composite_rectangles_t *composite,
-				  cairo_bool_t overlap)
+_cairo_xcb_render_compositor_glyphs (const cairo_compositor_t     *compositor,
+				     cairo_composite_rectangles_t *composite,
+				     cairo_scaled_font_t          *scaled_font,
+				     cairo_glyph_t                *glyphs,
+				     int                           num_glyphs,
+				     cairo_bool_t                  overlap)
 {
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) composite->surface;
+    cairo_operator_t op = composite->op;
+    cairo_pattern_t *source = &composite->source_pattern.base;
     cairo_int_status_t status;
 
     if (unlikely (! _operator_is_supported (surface->connection->flags, op)))
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index d74d6fa..bde03ff 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -48,6 +48,7 @@
 #include "cairo-image-surface-inline.h"
 #include "cairo-list-inline.h"
 #include "cairo-surface-backend-private.h"
+#include "cairo-compositor-private.h"
 
 #if CAIRO_HAS_XLIB_XCB_FUNCTIONS
 slim_hidden_proto (cairo_xcb_surface_create);
@@ -846,36 +847,126 @@ _cairo_xcb_surface_fallback (cairo_xcb_surface_t *surface,
 }
 
 static cairo_int_status_t
-_cairo_xcb_surface_paint (void			*abstract_surface,
-			  cairo_operator_t	 op,
-			  const cairo_pattern_t	*source,
-			  const cairo_clip_t	*clip)
+_cairo_xcb_fallback_compositor_paint (const cairo_compositor_t     *compositor,
+				      cairo_composite_rectangles_t *extents)
 {
-    cairo_xcb_surface_t *surface = abstract_surface;
-    cairo_composite_rectangles_t composite;
-    cairo_int_status_t status;
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) extents->surface;
+    cairo_surface_t *fallback = _cairo_xcb_surface_fallback (surface, extents);
 
-    status = _cairo_composite_rectangles_init_for_paint (&composite,
-							 &surface->base,
-							 op, source,
-							 clip);
-    if (unlikely (status))
-	return status;
+    return _cairo_surface_paint (fallback, extents->op,
+				 &extents->source_pattern.base,
+				 extents->clip);
+}
+
+static cairo_int_status_t
+_cairo_xcb_fallback_compositor_mask (const cairo_compositor_t     *compositor,
+				     cairo_composite_rectangles_t *extents)
+{
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) extents->surface;
+    cairo_surface_t *fallback = _cairo_xcb_surface_fallback (surface, extents);
+
+    return _cairo_surface_mask (fallback, extents->op,
+				 &extents->source_pattern.base,
+				 &extents->mask_pattern.base,
+				 extents->clip);
+}
+
+static cairo_int_status_t
+_cairo_xcb_fallback_compositor_stroke (const cairo_compositor_t     *compositor,
+				       cairo_composite_rectangles_t *extents,
+				       const cairo_path_fixed_t     *path,
+				       const cairo_stroke_style_t   *style,
+				       const cairo_matrix_t         *ctm,
+				       const cairo_matrix_t         *ctm_inverse,
+				       double                        tolerance,
+				       cairo_antialias_t             antialias)
+{
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) extents->surface;
+    cairo_surface_t *fallback = _cairo_xcb_surface_fallback (surface, extents);
 
-    if (surface->fallback == NULL) {
-	status = _cairo_xcb_surface_render_paint (surface, op, source,
-						  &composite);
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
+    return _cairo_surface_stroke (fallback, extents->op,
+				  &extents->source_pattern.base,
+				  path, style, ctm, ctm_inverse,
+				  tolerance, antialias,
+				  extents->clip);
+}
+
+static cairo_int_status_t
+_cairo_xcb_fallback_compositor_fill (const cairo_compositor_t     *compositor,
+				     cairo_composite_rectangles_t *extents,
+				     const cairo_path_fixed_t     *path,
+				     cairo_fill_rule_t             fill_rule,
+				     double                        tolerance,
+				     cairo_antialias_t             antialias)
+{
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) extents->surface;
+    cairo_surface_t *fallback = _cairo_xcb_surface_fallback (surface, extents);
+
+    return _cairo_surface_fill (fallback, extents->op,
+				&extents->source_pattern.base,
+				path, fill_rule, tolerance,
+				antialias, extents->clip);
+}
+
+static cairo_int_status_t
+_cairo_xcb_fallback_compositor_glyphs (const cairo_compositor_t     *compositor,
+				       cairo_composite_rectangles_t *extents,
+				       cairo_scaled_font_t          *scaled_font,
+				       cairo_glyph_t                *glyphs,
+				       int                           num_glyphs,
+				       cairo_bool_t                  overlap)
+{
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t *) extents->surface;
+    cairo_surface_t *fallback = _cairo_xcb_surface_fallback (surface, extents);
+
+    return _cairo_surface_show_text_glyphs (fallback, extents->op,
+					    &extents->source_pattern.base,
+					    NULL, 0, glyphs, num_glyphs,
+					    NULL, 0, 0,
+					    scaled_font, extents->clip);
+}
+
+static const cairo_compositor_t _cairo_xcb_fallback_compositor = {
+    &__cairo_no_compositor,
+
+    _cairo_xcb_fallback_compositor_paint,
+    _cairo_xcb_fallback_compositor_mask,
+    _cairo_xcb_fallback_compositor_stroke,
+    _cairo_xcb_fallback_compositor_fill,
+    _cairo_xcb_fallback_compositor_glyphs,
+};
+
+static const cairo_compositor_t _cairo_xcb_render_compositor = {
+    &_cairo_xcb_fallback_compositor,
+
+    _cairo_xcb_render_compositor_paint,
+    _cairo_xcb_render_compositor_mask,
+    _cairo_xcb_render_compositor_stroke,
+    _cairo_xcb_render_compositor_fill,
+    _cairo_xcb_render_compositor_glyphs,
+};
+
+static inline const cairo_compositor_t *
+get_compositor (cairo_surface_t **s)
+{
+    cairo_xcb_surface_t *surface = (cairo_xcb_surface_t * )*s;
+    if (surface->fallback) {
+	*s = &surface->fallback->base;
+	return ((cairo_image_surface_t *) *s)->compositor;
     }
 
-    status = _cairo_surface_paint (_cairo_xcb_surface_fallback (surface,
-								&composite),
-				   op, source, clip);
+    return &_cairo_xcb_render_compositor;
+}
 
-done:
-    _cairo_composite_rectangles_fini (&composite);
-    return status;
+static cairo_int_status_t
+_cairo_xcb_surface_paint (void			*abstract_surface,
+			  cairo_operator_t	 op,
+			  const cairo_pattern_t	*source,
+			  const cairo_clip_t	*clip)
+{
+    cairo_surface_t *surface = abstract_surface;
+    const cairo_compositor_t *compositor = get_compositor (&surface);
+    return _cairo_compositor_paint (compositor, surface, op, source, clip);
 }
 
 static cairo_int_status_t
@@ -885,30 +976,9 @@ _cairo_xcb_surface_mask (void			*abstract_surface,
 			 const cairo_pattern_t	*mask,
 			 const cairo_clip_t	*clip)
 {
-    cairo_xcb_surface_t *surface = abstract_surface;
-    cairo_composite_rectangles_t composite;
-    cairo_int_status_t status;
-
-    status = _cairo_composite_rectangles_init_for_mask (&composite,
-							&surface->base,
-							op, source, mask, clip);
-    if (unlikely (status))
-	return status;
-
-    if (surface->fallback == NULL) {
-	status =  _cairo_xcb_surface_render_mask (surface,
-						  op, source, mask, &composite);
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-    }
-
-    status = _cairo_surface_mask (_cairo_xcb_surface_fallback (surface,
-							       &composite),
-				  op, source, mask,
-				  clip);
-done:
-    _cairo_composite_rectangles_fini (&composite);
-    return status;
+    cairo_surface_t *surface = abstract_surface;
+    const cairo_compositor_t *compositor = get_compositor (&surface);
+    return _cairo_compositor_mask (compositor, surface, op, source, mask, clip);
 }
 
 static cairo_int_status_t
@@ -923,39 +993,11 @@ _cairo_xcb_surface_stroke (void				*abstract_surface,
 			   cairo_antialias_t		 antialias,
 			   const cairo_clip_t		*clip)
 {
-    cairo_xcb_surface_t *surface = abstract_surface;
-    cairo_composite_rectangles_t composite;
-    cairo_int_status_t status;
-
-    status = _cairo_composite_rectangles_init_for_stroke (&composite,
-							  &surface->base,
-							  op, source,
-							  path, style, ctm,
-							  clip);
-    if (unlikely (status))
-	return status;
-
-    if (surface->fallback == NULL) {
-	status = _cairo_xcb_surface_render_stroke (surface, op, source,
-						   path, style,
-						   ctm, ctm_inverse,
-						   tolerance, antialias,
-						   &composite);
-
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-    }
-
-    status = _cairo_surface_stroke (_cairo_xcb_surface_fallback (surface,
-								 &composite),
-				    op, source,
-				    path, style,
-				    ctm, ctm_inverse,
-				    tolerance, antialias,
-				    clip);
-done:
-    _cairo_composite_rectangles_fini (&composite);
-    return status;
+    cairo_surface_t *surface = abstract_surface;
+    const cairo_compositor_t *compositor = get_compositor (&surface);
+    return _cairo_compositor_stroke (compositor, surface, op, source,
+				     path, style, ctm, ctm_inverse,
+				     tolerance, antialias, clip);
 }
 
 static cairo_int_status_t
@@ -968,35 +1010,11 @@ _cairo_xcb_surface_fill (void			*abstract_surface,
 			 cairo_antialias_t	 antialias,
 			 const cairo_clip_t	*clip)
 {
-    cairo_xcb_surface_t *surface = abstract_surface;
-    cairo_composite_rectangles_t composite;
-    cairo_int_status_t status;
-
-    status = _cairo_composite_rectangles_init_for_fill (&composite,
-							&surface->base,
-							op, source, path,
-							clip);
-    if (unlikely (status))
-	return status;
-
-    if (surface->fallback == NULL) {
-	status = _cairo_xcb_surface_render_fill (surface, op, source,
-						 path, fill_rule,
-						 tolerance, antialias,
-						 &composite);
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-    }
-
-    status = _cairo_surface_fill (_cairo_xcb_surface_fallback (surface,
-							       &composite),
-				  op, source,
-				  path, fill_rule,
-				  tolerance, antialias,
-				  clip);
-done:
-    _cairo_composite_rectangles_fini (&composite);
-    return status;
+    cairo_surface_t *surface = abstract_surface;
+    const cairo_compositor_t *compositor = get_compositor (&surface);
+    return _cairo_compositor_fill (compositor, surface, op,
+				   source, path, fill_rule,
+				   tolerance, antialias, clip);
 }
 
 static cairo_int_status_t
@@ -1008,40 +1026,11 @@ _cairo_xcb_surface_glyphs (void				*abstract_surface,
 			   cairo_scaled_font_t		*scaled_font,
 			   const cairo_clip_t		*clip)
 {
-    cairo_xcb_surface_t *surface = abstract_surface;
-    cairo_composite_rectangles_t composite;
-    cairo_int_status_t status;
-    cairo_bool_t overlap;
-
-    status = _cairo_composite_rectangles_init_for_glyphs (&composite,
-							  &surface->base,
-							  op, source,
-							  scaled_font,
-							  glyphs, num_glyphs,
-							  clip, &overlap);
-    if (unlikely (status))
-	return status;
-
-    if (surface->fallback == NULL) {
-	status = _cairo_xcb_surface_render_glyphs (surface,
-						   op, source,
-						   scaled_font, glyphs, num_glyphs,
-						   &composite, overlap);
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-    }
-
-    status =  _cairo_surface_show_text_glyphs (_cairo_xcb_surface_fallback (surface,
-									    &composite),
-					       op, source,
-					       NULL, 0,
-					       glyphs, num_glyphs,
-					       NULL, 0, 0,
-					       scaled_font,
-					       clip);
-done:
-    _cairo_composite_rectangles_fini (&composite);
-    return status;
+    cairo_surface_t *surface = abstract_surface;
+    const cairo_compositor_t *compositor = get_compositor (&surface);
+    return _cairo_compositor_glyphs (compositor, surface, op,
+				     source, glyphs, num_glyphs,
+				     scaled_font, clip);
 }
 
 const cairo_surface_backend_t _cairo_xcb_surface_backend = {
commit 6300579a8b2c0e38a0c1abae89675bf6cb769902
Author: Uli Schlachter <psychon at znc.in>
Date:   Sat Sep 15 14:56:51 2012 +0200

    xcb: Remove unimplemented cairo compositor
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/Makefile.sources b/src/Makefile.sources
index 9a33677..d6793b0 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -330,7 +330,6 @@ cairo_xcb_sources = \
 		    cairo-xcb-screen.c \
 		    cairo-xcb-shm.c \
 		    cairo-xcb-surface.c \
-		    cairo-xcb-surface-cairo.c \
 		    cairo-xcb-surface-core.c \
 		    cairo-xcb-surface-render.c \
 		    $(NULL)
diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h
index 7c9af8f..35b50ad 100644
--- a/src/cairo-xcb-private.h
+++ b/src/cairo-xcb-private.h
@@ -386,50 +386,6 @@ _cairo_xcb_surface_get_extents (void *abstract_surface,
 				cairo_rectangle_int_t *extents);
 
 cairo_private cairo_int_status_t
-_cairo_xcb_surface_cairo_paint (cairo_xcb_surface_t	*surface,
-				cairo_operator_t	 op,
-				const cairo_pattern_t	*source,
-				const cairo_clip_t		*clip);
-
-cairo_private cairo_int_status_t
-_cairo_xcb_surface_cairo_mask (cairo_xcb_surface_t	*surface,
-			       cairo_operator_t		 op,
-			       const cairo_pattern_t	*source,
-			       const cairo_pattern_t	*mask,
-			       const cairo_clip_t		*clip);
-
-cairo_private cairo_int_status_t
-_cairo_xcb_surface_cairo_stroke (cairo_xcb_surface_t	*surface,
-				 cairo_operator_t	 op,
-				 const cairo_pattern_t	*source,
-				 const cairo_path_fixed_t	*path,
-				 const cairo_stroke_style_t	*style,
-				 const cairo_matrix_t		*ctm,
-				 const cairo_matrix_t		*ctm_inverse,
-				 double			 tolerance,
-				 cairo_antialias_t	 antialias,
-				 const cairo_clip_t		*clip);
-
-cairo_private cairo_int_status_t
-_cairo_xcb_surface_cairo_fill (cairo_xcb_surface_t	*surface,
-			       cairo_operator_t		 op,
-			       const cairo_pattern_t	*source,
-			       const cairo_path_fixed_t	*path,
-			       cairo_fill_rule_t	 fill_rule,
-			       double			 tolerance,
-			       cairo_antialias_t	 antialias,
-			       const cairo_clip_t		*clip);
-
-cairo_private cairo_int_status_t
-_cairo_xcb_surface_cairo_glyphs (cairo_xcb_surface_t	*surface,
-				 cairo_operator_t		 op,
-				 const cairo_pattern_t	*source,
-				 cairo_scaled_font_t	*scaled_font,
-				 cairo_glyph_t		*glyphs,
-				 int			 num_glyphs,
-				 const cairo_clip_t		*clip);
-
-cairo_private cairo_int_status_t
 _cairo_xcb_surface_render_paint (cairo_xcb_surface_t	*surface,
 				 cairo_operator_t	 op,
 				 const cairo_pattern_t	*source,
diff --git a/src/cairo-xcb-surface-cairo.c b/src/cairo-xcb-surface-cairo.c
deleted file mode 100644
index 338a616..0000000
--- a/src/cairo-xcb-surface-cairo.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* cairo - a vector graphics library with display and print output
- *
- * Copyright © 2009 Intel Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it either under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation
- * (the "LGPL") or, at your option, under the terms of the Mozilla
- * Public License Version 1.1 (the "MPL"). If you do not alter this
- * notice, a recipient may use your version of this file under either
- * the MPL or the LGPL.
- *
- * You should have received a copy of the LGPL along with this library
- * in the file COPYING-LGPL-2.1; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
- * You should have received a copy of the MPL along with this library
- * in the file COPYING-MPL-1.1
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
- * OF ANY KIND, either express or implied. See the LGPL or the MPL for
- * the specific language governing rights and limitations.
- *
- * Contributor(s):
- *	Chris Wilson <chris at chris-wilson.co.uk>
- */
-
-#include "cairoint.h"
-
-#include "cairo-clip-private.h"
-#include "cairo-xcb-private.h"
-
-cairo_int_status_t
-_cairo_xcb_surface_cairo_paint (cairo_xcb_surface_t	*surface,
-				cairo_operator_t	 op,
-				const cairo_pattern_t	*source,
-				const cairo_clip_t	*clip)
-{
-    return CAIRO_INT_STATUS_UNSUPPORTED;
-}
-
-cairo_int_status_t
-_cairo_xcb_surface_cairo_mask (cairo_xcb_surface_t	*surface,
-			       cairo_operator_t		 op,
-			       const cairo_pattern_t	*source,
-			       const cairo_pattern_t	*mask,
-			       const cairo_clip_t	*clip)
-{
-    return CAIRO_INT_STATUS_UNSUPPORTED;
-}
-
-cairo_int_status_t
-_cairo_xcb_surface_cairo_stroke (cairo_xcb_surface_t	*surface,
-				 cairo_operator_t	 op,
-				 const cairo_pattern_t	*source,
-				 const cairo_path_fixed_t	*path,
-				 const cairo_stroke_style_t	*style,
-				 const cairo_matrix_t		*ctm,
-				 const cairo_matrix_t		*ctm_inverse,
-				 double			 tolerance,
-				 cairo_antialias_t	 antialias,
-				 const cairo_clip_t		*clip)
-{
-    return CAIRO_INT_STATUS_UNSUPPORTED;
-}
-
-cairo_int_status_t
-_cairo_xcb_surface_cairo_fill (cairo_xcb_surface_t	*surface,
-			       cairo_operator_t		 op,
-			       const cairo_pattern_t	*source,
-			       const cairo_path_fixed_t	*path,
-			       cairo_fill_rule_t	 fill_rule,
-			       double			 tolerance,
-			       cairo_antialias_t	 antialias,
-			       const cairo_clip_t		*clip)
-{
-    return CAIRO_INT_STATUS_UNSUPPORTED;
-}
-
-cairo_int_status_t
-_cairo_xcb_surface_cairo_glyphs (cairo_xcb_surface_t	*surface,
-				 cairo_operator_t		 op,
-				 const cairo_pattern_t	*source,
-				 cairo_scaled_font_t	*scaled_font,
-				 cairo_glyph_t		*glyphs,
-				 int			 num_glyphs,
-				 const cairo_clip_t	*clip)
-{
-    return CAIRO_INT_STATUS_UNSUPPORTED;
-}
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 25de4b8..d74d6fa 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -863,10 +863,6 @@ _cairo_xcb_surface_paint (void			*abstract_surface,
 	return status;
 
     if (surface->fallback == NULL) {
-	status = _cairo_xcb_surface_cairo_paint (surface, op, source, clip);
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-
 	status = _cairo_xcb_surface_render_paint (surface, op, source,
 						  &composite);
 	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
@@ -900,11 +896,6 @@ _cairo_xcb_surface_mask (void			*abstract_surface,
 	return status;
 
     if (surface->fallback == NULL) {
-	status =  _cairo_xcb_surface_cairo_mask (surface,
-						 op, source, mask, clip);
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-
 	status =  _cairo_xcb_surface_render_mask (surface,
 						  op, source, mask, &composite);
 	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
@@ -945,15 +936,6 @@ _cairo_xcb_surface_stroke (void				*abstract_surface,
 	return status;
 
     if (surface->fallback == NULL) {
-	status = _cairo_xcb_surface_cairo_stroke (surface, op, source,
-						  path, style,
-						  ctm, ctm_inverse,
-						  tolerance, antialias,
-						  clip);
-
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-
 	status = _cairo_xcb_surface_render_stroke (surface, op, source,
 						   path, style,
 						   ctm, ctm_inverse,
@@ -998,13 +980,6 @@ _cairo_xcb_surface_fill (void			*abstract_surface,
 	return status;
 
     if (surface->fallback == NULL) {
-	status = _cairo_xcb_surface_cairo_fill (surface, op, source,
-						path, fill_rule,
-						tolerance, antialias,
-						clip);
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-
 	status = _cairo_xcb_surface_render_fill (surface, op, source,
 						 path, fill_rule,
 						 tolerance, antialias,
@@ -1048,13 +1023,6 @@ _cairo_xcb_surface_glyphs (void				*abstract_surface,
 	return status;
 
     if (surface->fallback == NULL) {
-	status = _cairo_xcb_surface_cairo_glyphs (surface,
-						  op, source,
-						  scaled_font, glyphs, num_glyphs,
-						  clip);
-	if (status != CAIRO_INT_STATUS_UNSUPPORTED)
-	    goto done;
-
 	status = _cairo_xcb_surface_render_glyphs (surface,
 						   op, source,
 						   scaled_font, glyphs, num_glyphs,


More information about the cairo-commit mailing list