[GRASS-SVN] r62578 - in grass/branches/releasebranch_7_0: . lib/cairodriver

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Nov 3 10:03:28 PST 2014


Author: martinl
Date: 2014-11-03 10:03:28 -0800 (Mon, 03 Nov 2014)
New Revision: 62578

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/lib/cairodriver/raster.c
Log:
libcairo: improve error message when unable to create surface
          (merge r62437 from trunk)



Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:61096,62179-62180,62182,62403,62422,62466,62487,62491,62494,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62570,62573,62575
   + /grass/trunk:61096,62179-62180,62182,62403,62422,62437,62466,62487,62491,62494,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62570,62573,62575

Modified: grass/branches/releasebranch_7_0/lib/cairodriver/raster.c
===================================================================
--- grass/branches/releasebranch_7_0/lib/cairodriver/raster.c	2014-11-03 17:56:30 UTC (rev 62577)
+++ grass/branches/releasebranch_7_0/lib/cairodriver/raster.c	2014-11-03 18:03:28 UTC (rev 62578)
@@ -68,10 +68,15 @@
     src_surf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, src_w, src_h);
     status = cairo_surface_status(src_surf);
     if (status != CAIRO_STATUS_SUCCESS)
-	G_fatal_error("Cairo_begin_raster(): %s (%s). Using rows: %d, cols: %d ",
+#ifdef HAVE_LONG_LONG_INT
+        G_fatal_error("Cairo_begin_raster(): %s - %s. Using rows: %d, cols: %d, cells: %lld.",
                       _("Failed to create surface"),
-                      cairo_status_to_string (status), src_b, src_r);
-
+                      cairo_status_to_string (status), src_b, src_r, (long long) src_b * src_r);
+#else
+        G_fatal_error("Cairo_begin_raster(): %s - %s. Using rows: %d, cols: %d, cells: %ld.",
+                      _("Failed to create surface"),
+                      cairo_status_to_string (status), src_b, src_r, (long) src_b * src_r);
+#endif
     src_data = cairo_image_surface_get_data(src_surf);
     src_stride = cairo_image_surface_get_stride(src_surf);
 }



More information about the grass-commit mailing list