Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: ecompmgr.c Log Message: Avoid creating/destroying regions - continued. =================================================================== RCS file: /cvs/e/e16/e/src/ecompmgr.c,v retrieving revision 1.148 retrieving revision 1.149 diff -u -3 -r1.148 -r1.149 --- ecompmgr.c 22 Apr 2007 14:08:35 -0000 1.148 +++ ecompmgr.c 22 Apr 2007 14:15:22 -0000 1.149 @@ -301,6 +301,18 @@ } static void +ERegionSetRect(XserverRegion rgn, int x, int y, int w, int h) +{ + XRectangle rct; + + rct.x = x; + rct.y = y; + rct.width = w; + rct.height = h; + XFixesSetRegion(disp, rgn, &rct, 1); +} + +static void ERegionTranslate(XserverRegion rgn, int dx, int dy) { if (dx == 0 && dy == 0) @@ -1071,12 +1083,9 @@ if (1 /* eo->shaped */ ) /* FIXME - Track shaped state */ { - XserverRegion rgn; - /* Intersect with window size to get effective bounding region */ - rgn = ERegionCreateRect(0, 0, EobjGetW(eo), EobjGetH(eo)); - ERegionIntersect(border, rgn); - ERegionDestroy(rgn); + ERegionSetRect(rgn_tmp, 0, 0, EobjGetW(eo), EobjGetH(eo)); + ERegionIntersect(border, rgn_tmp); } /* translate this */ @@ -1708,13 +1717,13 @@ if (!cw->damaged) { - parts = win_extents(eo); + parts = cw->extents; XDamageSubtract(dpy, cw->damage, None, None); cw->damaged = 1; } else { - parts = ERegionCreate(); + parts = rgn_tmp; XDamageSubtract(dpy, cw->damage, None, parts); ERegionTranslate(parts, EobjGetX(eo) + EobjGetBW(eo), EobjGetY(eo) + EobjGetBW(eo)); @@ -1732,7 +1741,6 @@ } eo->serial = ev->xany.serial; ECompMgrDamageMergeObject(eo, parts); - ERegionDestroy(parts); } static void ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs