summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-06-25 01:57:29 +0200
committerTor Andersson <tor@ghostscript.com>2010-06-25 01:57:29 +0200
commit6e5deca186079ebf4421033d4fba44b1892c181f (patch)
tree1b48982b2242b2a2e6718172cf87eacad6c4e667
parent551c0cf14e572fa7192704d6c20d96145f715efc (diff)
downloadmupdf-6e5deca186079ebf4421033d4fba44b1892c181f.tar.xz
Clear the pixmap buffer between bands.
-rw-r--r--apps/pdfdraw.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c
index e4ceebb2..73170eb4 100644
--- a/apps/pdfdraw.c
+++ b/apps/pdfdraw.c
@@ -206,9 +206,6 @@ static void drawpnm(int pagenum, struct benchmark *loadtimes, struct benchmark *
}
pix = fz_newpixmap((greyscale ? pdf_devicegray : pdf_devicergb), bbox.x0, bbox.y0, w, bh);
- fz_clearpixmap(pix, 0xFF);
-
- memset(pix->samples, 0xff, pix->h * pix->w * pix->n);
if (numbands > 1)
{
@@ -223,6 +220,7 @@ static void drawpnm(int pagenum, struct benchmark *loadtimes, struct benchmark *
for (b = 0; b < numbands; b++)
{
+ fz_clearpixmap(pix, 0xFF);
dev = fz_newdrawdevice(drawcache, pix);