summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2012-11-15 19:59:09 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2012-11-15 19:59:09 +0000
commit78e460e4bdfdfb1daed9a9549381f3e742ba4786 (patch)
treed1093c9543fb483f4156f50c742dd59b5e5447c2
parent056282aaeb7c05ca515611d674f496e258cb6cf6 (diff)
downloadnetsurf-78e460e4bdfdfb1daed9a9549381f3e742ba4786.tar.gz
netsurf-78e460e4bdfdfb1daed9a9549381f3e742ba4786.tar.bz2
Redraw newly revealed horizontal and vertical portions separately, avoiding double redraw of any intersection
-rwxr-xr-xamiga/gui.c2
-rw-r--r--desktop/frames.c33
2 files changed, 25 insertions, 10 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index d0729939e..185049d26 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3611,6 +3611,8 @@ printf("%ld,%ld,%ld,%ld,%ld,%ld\n", src_x, src_y, src_x1, src_y1, dest_x, dest_y
if(ami_ns_to_screen_coords(gwin, &dest_x, &dest_y) == false) return false;
printf("== %ld,%ld,%ld,%ld,%ld,%ld\n", src_x, src_y, src_x1, src_y1, dest_x, dest_y);
+ if(nsoption_bool(faster_scroll) == false) return false; /* for testing */
+
BltBitMapTags(BLITA_SrcType, BLITT_RASTPORT,
BLITA_Source, gwin->win->RPort,
BLITA_SrcX, src_x,
diff --git a/desktop/frames.c b/desktop/frames.c
index 0163e3de4..6dd0d09b4 100644
--- a/desktop/frames.c
+++ b/desktop/frames.c
@@ -63,27 +63,39 @@ void browser_window_scroll_callback(void *client_data,
if (bw->browser_window_type == BROWSER_WINDOW_IFRAME) {
html_redraw_a_box(bw->parent->current_content, bw->box);
} else {
- struct rect rect;
+ struct rect rect_x;
+ struct rect rect_y;
struct rect copyrect;
int dest_x = 0;
int dest_y = 0;
int cur_x = scrollbar_get_offset(bw->scroll_x);
int cur_y = scrollbar_get_offset(bw->scroll_y);
+ rect_y.x0 = 0;
+ rect_y.x1 = bw->width;
+ rect_x.y0 = 0;
+ rect_x.y1 = bw->height;
+
if(cur_y > bw->prev_scroll_y) {
copyrect.y0 = cur_y - bw->prev_scroll_y;
copyrect.y1 = bw->height;
dest_y = 0;
- rect.y0 = bw->height - copyrect.y0;
- rect.y1 = bw->height;
+ rect_y.y0 = bw->height - copyrect.y0;
+ rect_y.y1 = bw->height;
+
+ rect_x.y0 = 0;
+ rect_x.y1 = rect_y.y0;
} else {
copyrect.y0 = 0;
copyrect.y1 = bw->height - (cur_y - bw->prev_scroll_y);
dest_y = cur_y - bw->prev_scroll_y;
- rect.y0 = 0;
- rect.y1 = cur_y - bw->prev_scroll_y;
+ rect_y.y0 = 0;
+ rect_y.y1 = cur_y - bw->prev_scroll_y;
+
+ rect_x.y0 = rect_y.y1;
+ rect_x.y1 = bw->height;
}
if(cur_x > bw->prev_scroll_x) {
@@ -91,19 +103,20 @@ void browser_window_scroll_callback(void *client_data,
copyrect.x1 = bw->width;
dest_x = 0;
- rect.x0 = bw->height - copyrect.x0;
- rect.x1 = bw->height;
+ rect_x.x0 = bw->height - copyrect.x0;
+ rect_x.x1 = bw->height;
} else {
copyrect.x0 = 0;
copyrect.x1 = bw->width - (cur_x - bw->prev_scroll_x);
dest_x = cur_x - bw->prev_scroll_x;
- rect.x0 = 0;
- rect.x1 = cur_x - bw->prev_scroll_x;
+ rect_x.x0 = 0;
+ rect_x.x1 = cur_x - bw->prev_scroll_x;
}
browser_window_copy_box(bw, &copyrect, dest_x, dest_y);
- browser_window_update_box(bw, &rect);
+ browser_window_update_box(bw, &rect_y);
+ browser_window_update_box(bw, &rect_x);
bw->prev_scroll_x = scrollbar_get_offset(bw->scroll_x);
bw->prev_scroll_y = scrollbar_get_offset(bw->scroll_y);