]> granicus.if.org Git - graphviz/commitdiff
add memory estimation to -v output when creating a cario image surface
authorellson <devnull@localhost>
Wed, 6 Feb 2008 17:23:22 +0000 (17:23 +0000)
committerellson <devnull@localhost>
Wed, 6 Feb 2008 17:23:22 +0000 (17:23 +0000)
analogous to gd messages

plugin/pango/gvrender_pango.c

index 3f2450287a984d26cfadb39a56f5c604fdbc5172..8e2d701a6b216a6b59d776e8e8e9b4942dd6f282 100644 (file)
@@ -164,6 +164,11 @@ static void cairogen_begin_page(GVJ_t * job)
         default:
            surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
                        job->width, job->height);
+            if (job->common->verbose)
+                fprintf(stderr,
+                        "%s: allocating a %dK cairo image surface\n",
+                        job->common->cmdname,
+                        ROUND(job->width * job->height * 4 / 1024.));
            break;
         }
         cr = cairo_create(surface);