From a5a27ee85e10885a45b1223a885e4f94bc9ace90 Mon Sep 17 00:00:00 2001 From: iovar Date: Sun, 8 Jul 2007 15:35:03 +0000 Subject: rectinsert.c: added BlocksFromList function to extract changed areas for cache from the damage list. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@373 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/rectinsert.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/recordmydesktop/src/rectinsert.c b/recordmydesktop/src/rectinsert.c index fea6a1d..b46ec1f 100644 --- a/recordmydesktop/src/rectinsert.c +++ b/recordmydesktop/src/rectinsert.c @@ -511,3 +511,39 @@ void ClearList(RectArea **root){ } } +void BlocksFromList(RectArea **root, + unsigned int blocknum_x, + unsigned int blocknum_y){ + + RectArea *temp; + unsigned int i, + j, + blockno, + row_start, + row_end, + column_start, + column_end; + temp=*root; + for(i=0;igeom.x/Y_UNIT_WIDTH; + column_end=(temp->geom.x+temp->geom.width)/Y_UNIT_WIDTH; + row_start=temp->geom.y/Y_UNIT_WIDTH; + row_end=(temp->geom.y+temp->geom.height)/Y_UNIT_WIDTH; + for(i=row_start;inext; + } + +} + + -- cgit v1.2.3