diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-04 01:29:38 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-04 01:29:38 +0200 |
commit | fda7116fc12ea7e125ff8fc9851e3ca9280459b9 (patch) | |
tree | 940d4e7734bb297dbbf7454602615ac278e2be77 /apps | |
parent | 4d125739c1ac42d629360a7e2700410e788028c7 (diff) | |
download | mupdf-fda7116fc12ea7e125ff8fc9851e3ca9280459b9.tar.xz |
draw: Speed up display list execution by using a visibility test.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfapp.c | 4 | ||||
-rw-r--r-- | apps/pdfdraw.c | 6 | ||||
-rw-r--r-- | apps/xpsdraw.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index a9cb698a..8f5b3912 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -365,7 +365,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai /* Extract text */ app->page_text = fz_newtextspan(); tdev = fz_newtextdevice(app->page_text); - fz_executedisplaylist(app->page_list, tdev, fz_identity); + fz_executedisplaylist(app->page_list, tdev, fz_identity, fz_infinitebbox); fz_freedevice(tdev); } @@ -392,7 +392,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai app->image = fz_newpixmapwithrect(colorspace, bbox); fz_clearpixmapwithcolor(app->image, 255); idev = fz_newdrawdevice(app->cache, app->image); - fz_executedisplaylist(app->page_list, idev, ctm); + fz_executedisplaylist(app->page_list, idev, ctm, bbox); fz_freedevice(idev); } diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c index 9c46a3a9..3de0a80c 100644 --- a/apps/pdfdraw.c +++ b/apps/pdfdraw.c @@ -120,7 +120,7 @@ static void drawpage(pdf_xref *xref, int pagenum) dev = fz_newtracedevice(); printf("<page number=\"%d\">\n", pagenum); if (list) - fz_executedisplaylist(list, dev, fz_identity); + fz_executedisplaylist(list, dev, fz_identity, fz_infinitebbox); else pdf_runpage(xref, page, dev, fz_identity); printf("</page>\n"); @@ -132,7 +132,7 @@ static void drawpage(pdf_xref *xref, int pagenum) fz_textspan *text = fz_newtextspan(); dev = fz_newtextdevice(text); if (list) - fz_executedisplaylist(list, dev, fz_identity); + fz_executedisplaylist(list, dev, fz_identity, fz_infinitebbox); else pdf_runpage(xref, page, dev, fz_identity); fz_freedevice(dev); @@ -173,7 +173,7 @@ static void drawpage(pdf_xref *xref, int pagenum) dev = fz_newdrawdevice(glyphcache, pix); if (list) - fz_executedisplaylist(list, dev, ctm); + fz_executedisplaylist(list, dev, ctm, bbox); else pdf_runpage(xref, page, dev, ctm); fz_freedevice(dev); diff --git a/apps/xpsdraw.c b/apps/xpsdraw.c index a9050a1c..2e30de9a 100644 --- a/apps/xpsdraw.c +++ b/apps/xpsdraw.c @@ -115,7 +115,7 @@ static void drawpage(xps_context *ctx, int pagenum) dev = fz_newtracedevice(); printf("<page number=\"%d\">\n", pagenum); if (list) - fz_executedisplaylist(list, dev, fz_identity); + fz_executedisplaylist(list, dev, fz_identity, fz_infinitebbox); else xps_run_page(ctx, page, dev, fz_identity); printf("</page>\n"); @@ -127,7 +127,7 @@ static void drawpage(xps_context *ctx, int pagenum) fz_textspan *text = fz_newtextspan(); dev = fz_newtextdevice(text); if (list) - fz_executedisplaylist(list, dev, fz_identity); + fz_executedisplaylist(list, dev, fz_identity, fz_infinitebbox); else xps_run_page(ctx, page, dev, fz_identity); fz_freedevice(dev); @@ -171,7 +171,7 @@ static void drawpage(xps_context *ctx, int pagenum) dev = fz_newdrawdevice(glyphcache, pix); if (list) - fz_executedisplaylist(list, dev, ctm); + fz_executedisplaylist(list, dev, ctm, bbox); else xps_run_page(ctx, page, dev, ctm); fz_freedevice(dev); |