rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
Jamey Sharp 2010-07-14 11:19:41 -07:00
parent ccdf156890
commit 35ce892a70
6 changed files with 5 additions and 87 deletions

View File

@ -54,9 +54,7 @@ winMWExtWMProcs = {
winMWExtWMStartDrawing,
winMWExtWMStopDrawing,
winMWExtWMUpdateRegion,
#ifndef ROOTLESS_TRACK_DAMAGE
winMWExtWMDamageRects,
#endif
winMWExtWMRootlessSwitchWindow,
NULL,//winMWExtWMDoReorderWindow,
NULL,//winMWExtWMHideWindow,

View File

@ -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

View File

@ -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);

View File

@ -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
}

View File

@ -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)

View File

@ -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
}
/*