cairo: Remove claim that a null 'cairo' can work.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 4 Jan 2015 19:14:01 +0000 (11:14 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 4 Jan 2015 19:14:50 +0000 (11:14 -0800)
We found out in bug #43816 that it doesn't really work and isn't
worth maintaining anyhow.

src/output/cairo.c

index f61fe6b0764eff304cf0f2f40a8b19ae0f67a6d9..a962deb7acbfe49b6f2c699398ddb4b13fce31d6 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -563,24 +563,19 @@ xr_submit (struct output_driver *driver, const struct output_item *output_item)
 
    See the big comment in cairo.h for intended usage. */
 
-/* Gives new page CAIRO to XR for output.  CAIRO may be null to skip actually
-   rendering the page (which might be useful to find out how many pages an
-   output document has without actually rendering it). */
+/* Gives new page CAIRO to XR for output. */
 void
 xr_driver_next_page (struct xr_driver *xr, cairo_t *cairo)
 {
-  if (cairo != NULL)
-    {
-      cairo_save (cairo);
-      cairo_set_source_rgb (cairo, xr->bg.red, xr->bg.green, xr->bg.blue);
-      cairo_rectangle (cairo, 0, 0, xr->width, xr->length);
-      cairo_fill (cairo);
-      cairo_restore (cairo);
-
-      cairo_translate (cairo,
-                      xr_to_pt (xr->left_margin),
-                      xr_to_pt (xr->top_margin));
-    }
+  cairo_save (cairo);
+  cairo_set_source_rgb (cairo, xr->bg.red, xr->bg.green, xr->bg.blue);
+  cairo_rectangle (cairo, 0, 0, xr->width, xr->length);
+  cairo_fill (cairo);
+  cairo_restore (cairo);
+
+  cairo_translate (cairo,
+                   xr_to_pt (xr->left_margin),
+                   xr_to_pt (xr->top_margin));
 
   xr->page_number++;
   xr->cairo = cairo;