summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2009-02-04 18:10:10 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2009-02-04 18:10:10 +0000
commit73b761ecf5b4d97e5ab19974bbc5273158785c29 (patch)
tree753c8ec23705a6a8ac541b9a97edd306b79cde88 /amiga
parentfbf6d4cd4116dac4287403c52233f62bac88f3c0 (diff)
downloadnetsurf-73b761ecf5b4d97e5ab19974bbc5273158785c29.tar.gz
netsurf-73b761ecf5b4d97e5ab19974bbc5273158785c29.tar.bz2
Try to stop rendering of things that can't be seen
svn path=/trunk/netsurf/; revision=6362
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/gui.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index 2573d5c51..6d79afd55 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2065,8 +2065,14 @@ void ami_do_redraw_limits(struct gui_window *g, struct content *c,int x0, int y0
plot=amiplot;
+ if(x0-hcurrent<0) x0 = hcurrent;
+ if(y0-vcurrent<0) y0 = vcurrent;
+
+ if(x1>width+x0) x1 = width+x0;
+ if(y1>width+y0) y1 = width+y0;
+
content_redraw(c,
- -hcurrent,-vcurrent,width,height,
+ -hcurrent,-vcurrent,width-hcurrent,height-vcurrent,
floorf((x0 *
g->shared->bw->scale)-hcurrent),
ceilf((y0 *
@@ -2171,14 +2177,26 @@ note that content_redraw call needs to be modified to redraw
{
ami_clg(0xffffff);
- content_redraw(c, -hcurrent /* * g->bw->scale */,
+ if(c->type == CONTENT_HTML)
+ {
+ content_redraw(c, -hcurrent /* * g->bw->scale */,
-vcurrent /* * g->bw->scale */,
- width /* * g->bw->scale */,
+ width-hcurrent /* * g->bw->scale */,
+ height-vcurrent /* * g->bw->scale */,
+ 0,0,width /* * g->bw->scale */,
height /* * g->bw->scale */,
+ g->bw->scale,0xFFFFFF);
+ }
+ else
+ {
+ content_redraw(c, -hcurrent /* * g->bw->scale */,
+ -vcurrent /* * g->bw->scale */,
+ width-hcurrent /* * g->bw->scale */,
+ height-vcurrent /* * g->bw->scale */,
0,0,c->width /* * g->bw->scale */,
c->height /* * g->bw->scale */,
g->bw->scale,0xFFFFFF);
-
+ }
BltBitMapRastPort(glob.bm,0,0,g->win->RPort,xoffset,yoffset,width,height,0x0C0);
}