|
|
Sponsor |
xserver/miext/damage damage.c,1.10,1.11: msg#00177freedesktop.xserver.cvs
Committed by: keithp Update of /cvs/xserver/xserver/miext/damage In directory pdx:/tmp/cvs-serv24610/miext/damage Modified Files: damage.c Log Message: 2004-02-26 Keith Packard <keithp-aN4HjG94KOLQT0dZR+AlfA@xxxxxxxxxxxxxxxx> * miext/damage/damage.c: (damageDamageRegion): Fix offsets for pixmap damage so that damage to a backing pixmap gets reported with the right coordinates to a window damage monitor Index: damage.c =================================================================== RCS file: /cvs/xserver/xserver/miext/damage/damage.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- a/damage.c 2 Dec 2003 07:11:47 -0000 1.10 +++ b/damage.c 26 Feb 2004 19:26:32 -0000 1.11 @@ -108,11 +108,29 @@ RegionRec tmpRegion; BoxRec tmpBox; int draw_x, draw_y; +#ifdef COMPOSITE + int screen_x = 0, screen_y = 0; +#endif /* short circuit for empty regions */ if (!REGION_NOTEMPTY(pScreen, pRegion)) return; +#ifdef COMPOSITE + /* + * When drawing to a pixmap which is storing window contents, + * the region presented is in pixmap relative coordinates which + * need to be converted to screen relative coordinates + */ + if (pDrawable->type != DRAWABLE_WINDOW) + { + screen_x = ((PixmapPtr) pDrawable)->screen_x; + screen_y = ((PixmapPtr) pDrawable)->screen_y; + } + if (screen_x || screen_y) + REGION_TRANSLATE (pScreen, pRegion, screen_x, screen_y); +#endif + REGION_INIT (pScreen, &clippedRec, NullBox, 0); for (; pDamage; pDamage = pNext) { @@ -136,6 +154,20 @@ continue; } + draw_x = pDamage->pDrawable->x; + draw_y = pDamage->pDrawable->y; +#ifdef COMPOSITE + /* + * Need to move everyone to screen coordinates + * XXX what about off-screen pixmaps with non-zero x/y? + */ + if (pDamage->pDrawable->type != DRAWABLE_WINDOW) + { + draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x; + draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y; + } +#endif + /* * Clip against border or pixmap bounds */ @@ -149,10 +181,10 @@ else { BoxRec box; - box.x1 = pDamage->pDrawable->x; - box.y1 = pDamage->pDrawable->y; - box.x2 = pDamage->pDrawable->x + pDamage->pDrawable->width; - box.y2 = pDamage->pDrawable->y + pDamage->pDrawable->height; + box.x1 = draw_x; + box.y1 = draw_y; + box.x2 = draw_x + pDamage->pDrawable->width; + box.y2 = draw_y + pDamage->pDrawable->height; REGION_INIT(pScreen, &pixClip, &box, 1); pClip = &pixClip; } @@ -172,8 +204,6 @@ /* * Move region to target coordinate space */ - draw_x = pDamage->pDrawable->x; - draw_y = pDamage->pDrawable->y; if (draw_x || draw_y) REGION_TRANSLATE (pScreen, pDamageRegion, -draw_x, -draw_y); @@ -216,6 +246,11 @@ if (pDamageRegion == pRegion && (draw_x || draw_y)) REGION_TRANSLATE (pScreen, pDamageRegion, draw_x, draw_y); } +#ifdef COMPOSITE + if (screen_x || screen_y) + REGION_TRANSLATE (pScreen, pRegion, -screen_x, -screen_y); +#endif + REGION_UNINIT (pScreen, &clippedRec); }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | xserver ChangeLog,3.135,3.136, Keith Packard |
|---|---|
| Next by Date: | xfree86/drivers/ark ark_accel.c,1.7,1.8 ark_driver.c,1.23,1.24, Keith Packard |
| Previous by Thread: | xserver ChangeLog,3.135,3.136, Keith Packard |
| Next by Thread: | xfree86/drivers/ark ark_accel.c,1.7,1.8 ark_driver.c,1.23,1.24, Keith Packard |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|