summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-04-25 12:02:08 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-04-25 12:02:08 +0100
commit5b5e621c7ac1bedc8c153b8ab99d47224b537497 (patch)
treefbb3fdda0f5ebb1e24f2f35f6889f822a34a5fdc
parent9729febf7245431e80f4fe0acfba212db08e770d (diff)
downloadnetsurf-5b5e621c7ac1bedc8c153b8ab99d47224b537497.tar.gz
netsurf-5b5e621c7ac1bedc8c153b8ab99d47224b537497.tar.bz2
Keep the size of the bitmap and layers used for rendering in the structure itself, rather than assuming it is the same as the tile size.
-rw-r--r--amiga/gui.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 3df4d5459..41ecd3399 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3461,10 +3461,13 @@ static void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy,
{
int x, y;
struct rect clip;
- int tile_x_scale = (int)(nsoption_int(redraw_tile_size_x) / gwin->gw->scale);
- int tile_y_scale = (int)(nsoption_int(redraw_tile_size_y) / gwin->gw->scale);
-
- browserglob.shared_pens = &gwin->shared_pens;
+ int tile_size_x = glob->width;
+ int tile_size_y = glob->height;
+
+ int tile_x_scale = (int)(tile_size_x / gwin->gw->scale);
+ int tile_y_scale = (int)(tile_size_y / gwin->gw->scale);
+
+ browserglob.shared_pens = &gwin->shared_pens; /* do we need this?? */
if(top < 0) {
height += top;
@@ -3498,14 +3501,14 @@ static void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy,
for(y = top; y < (top + height); y += tile_y_scale) {
clip.y0 = 0;
- clip.y1 = nsoption_int(redraw_tile_size_y);
+ clip.y1 = tile_size_y;
if(clip.y1 > height) clip.y1 = height;
if((((y - sy) * gwin->gw->scale) + clip.y1) > bbox->Height)
clip.y1 = bbox->Height - ((y - sy) * gwin->gw->scale);
for(x = left; x < (left + width); x += tile_x_scale) {
clip.x0 = 0;
- clip.x1 = nsoption_int(redraw_tile_size_x);
+ clip.x1 = tile_size_x;
if(clip.x1 > width) clip.x1 = width;
if((((x - sx) * gwin->gw->scale) + clip.x1) > bbox->Width)
clip.x1 = bbox->Width - ((x - sx) * gwin->gw->scale);