[cairo-commit] test/create-for-stream.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Sep 25 16:42:14 PDT 2007


 test/create-for-stream.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
diff-tree 76b9b1819251c8f3df0a5ada92a501ad83baa5a1 (from 1e7f0bd4d5148940fe963eb20782bffe5ee735bd)
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Sep 26 00:41:31 2007 +0100

    [test/create-for-stream] Add the missing cairo_surface_finish().
    
    Moments after pushing the new test case did I realise the issue...
    We do not attempt to write out the surface to the user stream until
    we perform the cairo_surface_destroy() by which point we have lost
    the ability to interrogate the error status. We can avoid this by
    explicitly calling cairo_surface_finish() and then checking the
    error status - and we see that the error is indeed reported
    correctly.
    
    No bug. Nothing to see here. Please move along. (Apart from the
    request for the status to be return from cairo_surface_destroy!)

diff --git a/test/create-for-stream.c b/test/create-for-stream.c
index 4a58285..d6cb23b 100644
--- a/test/create-for-stream.c
+++ b/test/create-for-stream.c
@@ -153,6 +153,7 @@ test_surface (const char                
 
     draw_to (surface);
 
+    cairo_surface_finish (surface);
     status = cairo_surface_status (surface);
     cairo_surface_destroy (surface);
 


More information about the cairo-commit mailing list