summaryrefslogtreecommitdiff
path: root/src/plot/common.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-10-30 08:24:50 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-10-30 08:24:50 +0000
commit1a1da46f6bc8bbb35afd29b49361107e954bfafa (patch)
tree192ddb2c90835b38c806112011b77e485b54aa46 /src/plot/common.c
parent599c4eca7ced6d3dcb08c95c743b411a61bed289 (diff)
downloadlibnsfb-1a1da46f6bc8bbb35afd29b49361107e954bfafa.tar.gz
libnsfb-1a1da46f6bc8bbb35afd29b49361107e954bfafa.tar.bz2
A few tidyups.
Diffstat (limited to 'src/plot/common.c')
-rw-r--r--src/plot/common.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/plot/common.c b/src/plot/common.c
index 3aa36cd..063f68d 100644
--- a/src/plot/common.c
+++ b/src/plot/common.c
@@ -496,8 +496,6 @@ bitmap_tiles_x(nsfb_t *nsfb,
const nsfb_bbox_t *loc,
int tiles_x,
const nsfb_colour_t *pixel,
- int bmp_width,
- int bmp_height,
int bmp_stride,
bool alpha)
{
@@ -733,15 +731,7 @@ bitmap_tiles(nsfb_t *nsfb,
}
} else {
/* Unscaled */
- if (tiles_x != 1) {
- for (ty = 0; ty < tiles_y; ty++) {
- ok &= bitmap_tiles_x(nsfb, &tloc, tiles_x,
- pixel, bmp_width, bmp_height,
- bmp_stride, alpha);
- tloc.y0 += height;
- tloc.y1 += height;
- }
- } else if (tiles_x == 1) {
+ if (tiles_x == 1 || !set_dither) {
for (ty = 0; ty < tiles_y; ty++) {
for (tx = 0; tx < tiles_x; tx++) {
ok &= bitmap(nsfb, &tloc, pixel,
@@ -755,6 +745,13 @@ bitmap_tiles(nsfb_t *nsfb,
tloc.x1 = loc->x1 + skip;
tloc.y1 += height;
}
+ } else if (tiles_x > 1) {
+ for (ty = 0; ty < tiles_y; ty++) {
+ ok &= bitmap_tiles_x(nsfb, &tloc, tiles_x,
+ pixel, bmp_stride, alpha);
+ tloc.y0 += height;
+ tloc.y1 += height;
+ }
}
}