summaryrefslogtreecommitdiff
path: root/raster
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@hotmail.com>2008-03-09 00:22:04 +0100
committerSebastian Rasmussen <sebras@hotmail.com>2008-03-09 00:22:04 +0100
commit8236955d750ebde9d90fcda18447b0ec5554379c (patch)
tree3e1a123acbc9b90503f6082d469c467b4d363ada /raster
parent4550244068208eb04dcf868e59267a6b7494b837 (diff)
downloadmupdf-8236955d750ebde9d90fcda18447b0ec5554379c.tar.xz
Fixed initial line whitespace.
Diffstat (limited to 'raster')
-rw-r--r--raster/imagescale.c18
-rw-r--r--raster/imageunpack.c2
-rw-r--r--raster/render.c4
3 files changed, 20 insertions, 4 deletions
diff --git a/raster/imagescale.c b/raster/imagescale.c
index bbe20565..7edb0cd2 100644
--- a/raster/imagescale.c
+++ b/raster/imagescale.c
@@ -212,7 +212,23 @@ fz_scalepixmap(fz_pixmap **dstp, fz_pixmap *src, int xdenom, int ydenom)
case 1: srowx = fz_srow1; scolx = fz_scol1; break;
case 2: srowx = fz_srow2; scolx = fz_scol2; break;
case 4: srowx = fz_srow4; scolx = fz_scol4; break;
- case 5: srowx = fz_srow5; scolx = fz_scol5; break;
+ case 5: srowx = fz_srow5; scolx = fz_scol5;
+ if (!(xdenom & (xdenom - 1)))
+ {
+ unsigned v = xdenom;
+ xdenom = 0;
+ while ((v >>= 1)) xdenom++;
+ srowx = srow5p2;
+ }
+ if (!(ydenom & (ydenom - 1)))
+ {
+ unsigned v = ydenom2;
+ ydenom2 = 0;
+ while ((v >>= 1)) ydenom2++;
+ scolx = scol5p2;
+ }
+
+ break;
}
if (srowx && scolx)
diff --git a/raster/imageunpack.c b/raster/imageunpack.c
index 451967c8..591c4b60 100644
--- a/raster/imageunpack.c
+++ b/raster/imageunpack.c
@@ -28,7 +28,7 @@ static void decodetile(fz_pixmap *pix, int skip, float *decode)
min[i] = decode[(i - skip) * 2] * 255;
max[i] = decode[(i - skip) * 2 + 1] * 255;
sub[i] = max[i] - min[i];
- needed |= (min[i] != 0) | (max[i] != 255);
+ needed |= (min[i] != 0) | (max[i] != 255);
}
if (!needed)
diff --git a/raster/render.c b/raster/render.c
index 803ba603..50e16d8a 100644
--- a/raster/render.c
+++ b/raster/render.c
@@ -792,8 +792,8 @@ rendernode(fz_renderer *gc, fz_node *node, fz_matrix ctm)
return rendernode(gc, ((fz_linknode*)node)->tree->root, ctm);
case FZ_NMETA:
return rendernode(gc, node->first, ctm);
- case FZ_NBLEND:
- return nil;
+ case FZ_NBLEND:
+ return nil;
}
return nil;