summaryrefslogtreecommitdiffstats
path: root/x11vnc/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11vnc/scan.c')
-rw-r--r--x11vnc/scan.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/x11vnc/scan.c b/x11vnc/scan.c
index 23fd32d..a5a4670 100644
--- a/x11vnc/scan.c
+++ b/x11vnc/scan.c
@@ -881,7 +881,10 @@ void scale_rect(double factor, int blend, int interpolate, int Bpp,
j1 = nfix(j1, ny);
j2 = nfix(j2, ny) + 1;
- /* special case integer magnification with no blending */
+ /*
+ * special case integer magnification with no blending.
+ * vision impaired magnification usage is interested in this case.
+ */
if (mark && ! blend && mag_int && Bpp != 3) {
int jmin, jmax, imin, imax;
@@ -1122,14 +1125,10 @@ void scale_rect(double factor, int blend, int interpolate, int Bpp,
*/
if (Bpp == 4) {
/* unroll the loops, can give 20% */
- pixave[0] += w *
- ((unsigned char) *(src ));
- pixave[1] += w *
- ((unsigned char) *(src+1));
- pixave[2] += w *
- ((unsigned char) *(src+2));
- pixave[3] += w *
- ((unsigned char) *(src+3));
+ pixave[0] += w * ((unsigned char) *(src ));
+ pixave[1] += w * ((unsigned char) *(src+1));
+ pixave[2] += w * ((unsigned char) *(src+2));
+ pixave[3] += w * ((unsigned char) *(src+3));
} else if (Bpp == 2) {
/*
* 16bpp: trickier with green