mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 01:09:39 +03:00
Optimise box redraws some more by discarding simple subsets
This commit is contained in:
parent
7c671378aa
commit
02115a8958
20
amiga/gui.c
20
amiga/gui.c
@ -3818,16 +3818,24 @@ static bool gui_window_update_box_deferred_check(struct MinList *deferred_rects,
|
|||||||
node = (struct nsObject *)GetHead((struct List *)deferred_rects);
|
node = (struct nsObject *)GetHead((struct List *)deferred_rects);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
nnode=(struct nsObject *)GetSucc((struct Node *)node);
|
||||||
rect = (struct rect *)node->objstruct;
|
rect = (struct rect *)node->objstruct;
|
||||||
|
|
||||||
if((rect->x0 == new_rect->x0) &&
|
if((rect->x0 <= new_rect->x0) &&
|
||||||
(rect->y0 == new_rect->y0) &&
|
(rect->y0 <= new_rect->y0) &&
|
||||||
(rect->x1 == new_rect->x1) &&
|
(rect->x1 >= new_rect->x1) &&
|
||||||
(rect->y1 == new_rect->y1)) {
|
(rect->y1 >= new_rect->y1)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
nnode=(struct nsObject *)GetSucc((struct Node *)node);
|
if ((new_rect->x0 <= rect->x0) &&
|
||||||
|
(new_rect->y0 <= rect->y0) &&
|
||||||
|
(new_rect->x1 >= rect->x1) &&
|
||||||
|
(new_rect->y1 >= rect->y1)) {
|
||||||
|
LOG(("Removing queued redraw that is a subset of new box redraw"));
|
||||||
|
DelObject(node);
|
||||||
|
/* Don't return - we might find more */
|
||||||
|
}
|
||||||
} while(node = nnode);
|
} while(node = nnode);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -3847,7 +3855,7 @@ void gui_window_update_box(struct gui_window *g, const struct rect *rect)
|
|||||||
nsobj = AddObject(g->deferred_rects, AMINS_RECT);
|
nsobj = AddObject(g->deferred_rects, AMINS_RECT);
|
||||||
nsobj->objstruct = deferred_rect;
|
nsobj->objstruct = deferred_rect;
|
||||||
} else {
|
} else {
|
||||||
LOG(("Ignoring duplicate box redraw already queued"));
|
LOG(("Ignoring duplicate or subset of queued box redraw"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user