From: Charlie Brej Date: Sun, 22 Nov 2009 22:21:49 +0000 (+0000) Subject: [region] Do not prefetch next rectangle node while processing list X-Git-Tag: 0.8.0~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f2e0b1b2240367356db0600b7354428ab19780a;p=thirdparty%2Fplymouth.git [region] Do not prefetch next rectangle node while processing list If we fetch the next node while working on the current node, recursing down the list may remove the next node. Just to be double sure, we recurse direct to next node so the current is not damaged. --- diff --git a/src/libply/ply-region.c b/src/libply/ply-region.c index e7604157..08284df0 100644 --- a/src/libply/ply-region.c +++ b/src/libply/ply-region.c @@ -135,7 +135,7 @@ merge_rectangle_with_sub_list (ply_region_t *region, rectangle->width = old_area->x - new_area->x; rectangle->height = (new_area->y + new_area->height) - old_area->y; - merge_rectangle_with_sub_list (region, rectangle, node); + merge_rectangle_with_sub_list (region, rectangle, next_node); new_area->height = old_area->y - new_area->y; } @@ -156,7 +156,7 @@ merge_rectangle_with_sub_list (ply_region_t *region, rectangle->width = (old_area->x + new_area->width) - (old_area->x + old_area->width); rectangle->height = (new_area->y + new_area->height) - old_area->y; - merge_rectangle_with_sub_list (region, rectangle, node); + merge_rectangle_with_sub_list (region, rectangle, next_node); new_area->height = old_area->y - new_area->y; } @@ -200,7 +200,7 @@ merge_rectangle_with_sub_list (ply_region_t *region, rectangle->width = old_area->x - new_area->x; rectangle->height = (old_area->y + old_area->height) - new_area->y; - merge_rectangle_with_sub_list (region, rectangle, node); + merge_rectangle_with_sub_list (region, rectangle, next_node); new_area->height = (new_area->y + new_area->height) - (old_area->y + old_area->height); new_area->width = new_area->width; @@ -224,7 +224,7 @@ merge_rectangle_with_sub_list (ply_region_t *region, rectangle->width = (new_area->x + new_area->width) - (old_area->x + old_area->width); rectangle->height = (old_area->y + old_area->height) - new_area->y; - merge_rectangle_with_sub_list (region, rectangle, node); + merge_rectangle_with_sub_list (region, rectangle, next_node); new_area->height = (new_area->y + new_area->height) - (old_area->y + old_area->height); new_area->y = old_area->y + old_area->height; @@ -300,7 +300,7 @@ merge_rectangle_with_sub_list (ply_region_t *region, rectangle->y = old_area->y + old_area->height; rectangle->width = new_area->width; rectangle->height = (new_area->y + new_area->height) - (old_area->y + old_area->height); - merge_rectangle_with_sub_list (region, rectangle, node); + merge_rectangle_with_sub_list (region, rectangle, next_node); new_area->height = old_area->y - new_area->y; } @@ -341,7 +341,7 @@ merge_rectangle_with_sub_list (ply_region_t *region, rectangle->x = old_area->x + old_area->width; rectangle->width = (new_area->x + new_area->width) - (old_area->x + old_area->width); - merge_rectangle_with_sub_list (region, rectangle, node); + merge_rectangle_with_sub_list (region, rectangle, next_node); new_area->width = old_area->x - new_area->x; } @@ -358,7 +358,7 @@ merge_rectangle_with_sub_list (ply_region_t *region, } - node = next_node; + node = ply_list_get_next_node (region->rectangle_list, node); } ply_list_append_data (region->rectangle_list, new_area);