[cairo-commit] cairo/src test-fallback-surface.c,1.1,1.2

Carl Worth commit at pdx.freedesktop.org
Fri Dec 16 11:48:51 PST 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv4010/src

Modified Files:
	test-fallback-surface.c 
Log Message:

2005-12-16  Carl Worth  <cworth at cworth.org>

        * src/test-fallback-surface.c:
        (_test_fallback_surface_create_similar): Return a
        test_fallback_surface_t rather than a cairo_image_surface_t for
        better testing, (otherwise, an image surface would meet the
        semantic demands of create_similar just fine).


Index: test-fallback-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/test-fallback-surface.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test-fallback-surface.c	16 Dec 2005 19:31:11 -0000	1.1
+++ test-fallback-surface.c	16 Dec 2005 19:48:49 -0000	1.2
@@ -37,6 +37,10 @@
  * test suite to test a mythical backend that uses nothing but
  * fallbacks.
  *
+ * The defining feature of this backend is that it has as many NULL
+ * backend function entries as possible, (and it might be worth
+ * working to try to allow one or two more to be NULL as well).
+ *
  * It's possible that this code might serve as a good starting point
  * for someone working on bringing up a new backend, starting with the
  * minimal all-fallbacks approach and working up gradually from
@@ -115,10 +119,10 @@
 				       int		 width,
 				       int		 height)
 {
-    test_fallback_surface_t *surface = abstract_surface;
+    assert (CAIRO_CONTENT_VALID (content));
 
-    return cairo_surface_create_similar (surface->backing, content,
-					 width, height);
+    return _test_fallback_surface_create (_cairo_format_from_content (content),
+					  width, height);
 }
 
 static cairo_status_t



More information about the cairo-commit mailing list