summaryrefslogtreecommitdiff
path: root/source/tools
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2016-07-20 08:08:50 -0700
committerRay Johnston <ray.johnston@artifex.com>2016-07-20 09:19:38 -0700
commit03909b0f38a58f47aec99a72a726ff7a791f5f08 (patch)
tree79b57de03e221a150bd932e6c6bf972f915cd584 /source/tools
parentd7dd1e0e564996d3950ff058aa1bb0ef0ceba9cf (diff)
downloadmupdf-03909b0f38a58f47aec99a72a726ff7a791f5f08.tar.xz
Fix timing (-st) reporting for muraster and default to no BGPRINT
Since -P only turns on BGPRINT (parsing and rendering in different threads), the default bgprint.active needs to be false. The filename and pagenum were only being printed for bgprint.active mode, and the timing.total wasn't being updated for bgprint.active mode. Also missing \n on bgprint.active showtime output.
Diffstat (limited to 'source/tools')
-rw-r--r--source/tools/muraster.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/tools/muraster.c b/source/tools/muraster.c
index 3430d297..ed52b01a 100644
--- a/source/tools/muraster.c
+++ b/source/tools/muraster.c
@@ -979,9 +979,10 @@ static int try_render_page(fz_context *ctx, int pagenum, fz_cookie *cookie, int
timing.maxpage = pagenum;
timing.maxfilename = filename;
}
+ timing.total += diff + interptime;
timing.count ++;
- fprintf(stderr, " %dms (interpretation) %dms (rendering) %dms (total)", interptime, diff, diff + interptime);
+ fprintf(stderr, " %dms (interpretation) %dms (rendering) %dms (total)\n", interptime, diff, diff + interptime);
}
else
{
@@ -1320,13 +1321,12 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
}
while (1);
+ if (showtime)
+ {
+ fprintf(stderr, "page %s %d", filename, pagenum);
+ }
if (bgprint.active)
{
- if (bgprint.active && showtime)
- {
- fprintf(stderr, "page %s %d", filename, pagenum);
- }
-
bgprint.started = 1;
bgprint.solo = 0;
bgprint.render = render;
@@ -1556,7 +1556,7 @@ int main(int argc, char **argv)
fz_var(doc);
- bgprint.active = BGPRINT;
+ bgprint.active = 0; /* set by -P */
min_band_height = MIN_BAND_HEIGHT;
max_band_memory = BAND_MEMORY;
width = 0;