From 35ce892a705f9377a36f19414e5a25dcbe44a354 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Wed, 14 Jul 2010 11:19:41 -0700 Subject: rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it. Signed-off-by: Jamey Sharp Cc: Jeremy Huddleston Cc: Jon TURNEY Reviewed-by: Jeremy Huddleston --- miext/rootless/README.txt | 19 ++----------------- miext/rootless/rootless.h | 16 +++------------- miext/rootless/rootlessCommon.c | 35 ----------------------------------- miext/rootless/rootlessConfig.h | 2 -- miext/rootless/rootlessWindow.c | 18 ------------------ 5 files changed, 5 insertions(+), 85 deletions(-) (limited to 'miext') diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt index 2c3fbb05a..8a6df74e6 100644 --- a/miext/rootless/README.txt +++ b/miext/rootless/README.txt @@ -105,18 +105,6 @@ rootlessConfig.h: during resizing and rely on the frame contents being preserved accordingly. - o ROOTLESS_TRACK_DAMAGE: The generic rootless layer draws to the - frames' backing buffers and periodically flushes the modified - regions to the underlying window server. If this option is true, - the generic rootless layer will track these damaged regions. - Currently it uses the miRegion code and will not simplify damaged - regions even when updating a bounding region would be more - efficient. Some window systems provide a more efficient way to - track damaged regions. If this option is false, the rootless - implementation function DamageRects() is called whenever a - backing buffer is modified and the rootless implementation is - expected to track the damaged regions itself. - The following runtime options are defined in rootless.h: o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only @@ -287,8 +275,7 @@ typedef void (*RootlessStartDrawingProc) * is started again. * * wid Frame id - * flush Flush drawing updates for this frame to the screen. This - * will always be FALSE if ROOTLESS_TRACK_DAMAGE is set. + * flush Flush drawing updates for this frame to the screen. */ typedef void (*RootlessStopDrawingProc) (RootlessFrameID wid, Bool flush); @@ -299,15 +286,13 @@ typedef void (*RootlessStopDrawingProc) * * wid Frame id * pDamage Region containing all the changed pixels in frame-local - * coordinates. This is clipped to the window's clip. This - * will be NULL if ROOTLESS_TRACK_DAMAGE is not set. + * coordinates. This is clipped to the window's clip. */ typedef void (*RootlessUpdateRegionProc) (RootlessFrameID wid, RegionPtr pDamage); /* * Mark damaged rectangles as requiring redisplay to screen. - * This will only be called if ROOTLESS_TRACK_DAMAGE is not set. * * wid Frame id * nrects Number of damaged rectangles diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h index dc4213f1e..f400695f6 100644 --- a/miext/rootless/rootless.h +++ b/miext/rootless/rootless.h @@ -68,10 +68,6 @@ typedef struct _RootlessWindowRec { PixmapPtr pixmap; -#ifdef ROOTLESS_TRACK_DAMAGE - RegionRec damage; -#endif - unsigned int is_drawing :1; // Currently drawing? unsigned int is_reorder_pending :1; unsigned int is_offscreen :1; @@ -227,8 +223,7 @@ typedef void (*RootlessStartDrawingProc) * is started again. * * wid Frame id - * flush Flush drawing updates for this frame to the screen. This - * will always be FALSE if ROOTLESS_TRACK_DAMAGE is set. + * flush Flush drawing updates for this frame to the screen. */ typedef void (*RootlessStopDrawingProc) (RootlessFrameID wid, Bool flush); @@ -239,15 +234,13 @@ typedef void (*RootlessStopDrawingProc) * * wid Frame id * pDamage Region containing all the changed pixels in frame-lcoal - * coordinates. This is clipped to the window's clip. This - * will be NULL if ROOTLESS_TRACK_DAMAGE is not set. + * coordinates. This is clipped to the window's clip. */ typedef void (*RootlessUpdateRegionProc) (RootlessFrameID wid, RegionPtr pDamage); /* * Mark damaged rectangles as requiring redisplay to screen. - * This will only be called if ROOTLESS_TRACK_DAMAGE is not set. * * wid Frame id * nrects Number of damaged rectangles @@ -374,9 +367,7 @@ typedef struct _RootlessFrameProcs { RootlessStartDrawingProc StartDrawing; RootlessStopDrawingProc StopDrawing; RootlessUpdateRegionProc UpdateRegion; -#ifndef ROOTLESS_TRACK_DAMAGE RootlessDamageRectsProc DamageRects; -#endif /* Optional frame functions */ RootlessSwitchWindowProc SwitchWindow; @@ -426,8 +417,7 @@ void RootlessStartDrawing(WindowPtr pWindow); /* * Finish drawing to a window's backing buffer. * - * flush If true and ROOTLESS_TRACK_DAMAGE is set, damaged areas - * are flushed to the screen. + * flush If true, damaged areas are flushed to the screen. */ void RootlessStopDrawing(WindowPtr pWindow, Bool flush); diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c index f91cfb432..b0476d711 100644 --- a/miext/rootless/rootlessCommon.c +++ b/miext/rootless/rootlessCommon.c @@ -305,16 +305,11 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) if (in == rgnIN) { /* clip totally contains pRegion */ -#ifdef ROOTLESS_TRACK_DAMAGE - RegionUnion(&winRec->damage, - &winRec->damage, (pRegion)); -#else SCREENREC(pWindow->drawable.pScreen)->imp-> DamageRects(winRec->wid, RegionNumRects(pRegion), RegionRects(pRegion), -winRec->x, -winRec->y); -#endif RootlessQueueRedisplay(pTop->drawable.pScreen); goto out; @@ -331,16 +326,11 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) RegionNull(&clipped); RegionIntersect(&clipped, &pWindow->borderClip, pRegion); -#ifdef ROOTLESS_TRACK_DAMAGE - RegionUnion(&winRec->damage, - &winRec->damage, (pRegion)); -#else SCREENREC(pWindow->drawable.pScreen)->imp-> DamageRects(winRec->wid, RegionNumRects(&clipped), RegionRects(&clipped), -winRec->x, -winRec->y); -#endif RegionUninit(&clipped); @@ -415,32 +405,7 @@ RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) void RootlessRedisplay(WindowPtr pWindow) { -#ifdef ROOTLESS_TRACK_DAMAGE - - RootlessWindowRec *winRec = WINREC(pWindow); - ScreenPtr pScreen = pWindow->drawable.pScreen; - - RootlessStopDrawing(pWindow, FALSE); - - if (RegionNotEmpty(&winRec->damage)) { - RL_DEBUG_MSG("Redisplay Win 0x%x, %i x %i @ (%i, %i)\n", - pWindow, winRec->width, winRec->height, - winRec->x, winRec->y); - - // move region to window local coords - RegionTranslate(&winRec->damage, - -winRec->x, -winRec->y); - - SCREENREC(pScreen)->imp->UpdateRegion(winRec->wid, &winRec->damage); - - RegionEmpty(&winRec->damage); - } - -#else /* !ROOTLESS_TRACK_DAMAGE */ - RootlessStopDrawing(pWindow, TRUE); - -#endif } diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h index 50bac3f51..9082ac2b8 100644 --- a/miext/rootless/rootlessConfig.h +++ b/miext/rootless/rootlessConfig.h @@ -40,7 +40,6 @@ # define ROOTLESS_PROTECT_ALPHA TRUE # define ROOTLESS_REDISPLAY_DELAY 10 # define ROOTLESS_RESIZE_GRAVITY TRUE -# undef ROOTLESS_TRACK_DAMAGE /*# define ROOTLESSDEBUG*/ /* Bit mask for alpha channel with a particular number of bits per @@ -56,7 +55,6 @@ # define ROOTLESS_PROTECT_ALPHA NO # define ROOTLESS_REDISPLAY_DELAY 10 # undef ROOTLESS_RESIZE_GRAVITY -# undef ROOTLESS_TRACK_DAMAGE /*# define ROOTLESSDEBUG*/ # define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0) diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index c1c6bdbfd..410f7294d 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -180,11 +180,6 @@ static void RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec) { SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid); - -#ifdef ROOTLESS_TRACK_DAMAGE - RegionUninit(&winRec->damage); -#endif - free(winRec); SETWINREC(pWin, NULL); } @@ -341,15 +336,6 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y) winRec->pixmap->devPrivate.ptr = winRec->pixelData; SetPixmapBaseToScreen(winRec->pixmap, x - bw, y - bw); - -#ifdef ROOTLESS_TRACK_DAMAGE - // Move damaged region to correspond to new window position - if (RegionNotEmpty(&winRec->damage)) { - RegionTranslate(&winRec->damage, - x - bw - winRec->x, - y - bw - winRec->y); - } -#endif } } @@ -381,10 +367,6 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec) winRec->width = d->width + 2*bw; winRec->height = d->height + 2*bw; winRec->borderWidth = bw; - -#ifdef ROOTLESS_TRACK_DAMAGE - RegionNull(&winRec->damage); -#endif } /* -- cgit v1.2.3