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:
parent
ccdf156890
commit
35ce892a70
|
@ -54,9 +54,7 @@ winMWExtWMProcs = {
|
||||||
winMWExtWMStartDrawing,
|
winMWExtWMStartDrawing,
|
||||||
winMWExtWMStopDrawing,
|
winMWExtWMStopDrawing,
|
||||||
winMWExtWMUpdateRegion,
|
winMWExtWMUpdateRegion,
|
||||||
#ifndef ROOTLESS_TRACK_DAMAGE
|
|
||||||
winMWExtWMDamageRects,
|
winMWExtWMDamageRects,
|
||||||
#endif
|
|
||||||
winMWExtWMRootlessSwitchWindow,
|
winMWExtWMRootlessSwitchWindow,
|
||||||
NULL,//winMWExtWMDoReorderWindow,
|
NULL,//winMWExtWMDoReorderWindow,
|
||||||
NULL,//winMWExtWMHideWindow,
|
NULL,//winMWExtWMHideWindow,
|
||||||
|
|
|
@ -105,18 +105,6 @@ rootlessConfig.h:
|
||||||
during resizing and rely on the frame contents being preserved
|
during resizing and rely on the frame contents being preserved
|
||||||
accordingly.
|
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:
|
The following runtime options are defined in rootless.h:
|
||||||
|
|
||||||
o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only
|
o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These are only
|
||||||
|
@ -287,8 +275,7 @@ typedef void (*RootlessStartDrawingProc)
|
||||||
* is started again.
|
* is started again.
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* flush Flush drawing updates for this frame to the screen. This
|
* flush Flush drawing updates for this frame to the screen.
|
||||||
* will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*RootlessStopDrawingProc)
|
typedef void (*RootlessStopDrawingProc)
|
||||||
(RootlessFrameID wid, Bool flush);
|
(RootlessFrameID wid, Bool flush);
|
||||||
|
@ -299,15 +286,13 @@ typedef void (*RootlessStopDrawingProc)
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* pDamage Region containing all the changed pixels in frame-local
|
* pDamage Region containing all the changed pixels in frame-local
|
||||||
* coordinates. This is clipped to the window's clip. This
|
* coordinates. This is clipped to the window's clip.
|
||||||
* will be NULL if ROOTLESS_TRACK_DAMAGE is not set.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*RootlessUpdateRegionProc)
|
typedef void (*RootlessUpdateRegionProc)
|
||||||
(RootlessFrameID wid, RegionPtr pDamage);
|
(RootlessFrameID wid, RegionPtr pDamage);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mark damaged rectangles as requiring redisplay to screen.
|
* Mark damaged rectangles as requiring redisplay to screen.
|
||||||
* This will only be called if ROOTLESS_TRACK_DAMAGE is not set.
|
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* nrects Number of damaged rectangles
|
* nrects Number of damaged rectangles
|
||||||
|
|
|
@ -68,10 +68,6 @@ typedef struct _RootlessWindowRec {
|
||||||
|
|
||||||
PixmapPtr pixmap;
|
PixmapPtr pixmap;
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionRec damage;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
unsigned int is_drawing :1; // Currently drawing?
|
unsigned int is_drawing :1; // Currently drawing?
|
||||||
unsigned int is_reorder_pending :1;
|
unsigned int is_reorder_pending :1;
|
||||||
unsigned int is_offscreen :1;
|
unsigned int is_offscreen :1;
|
||||||
|
@ -227,8 +223,7 @@ typedef void (*RootlessStartDrawingProc)
|
||||||
* is started again.
|
* is started again.
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* flush Flush drawing updates for this frame to the screen. This
|
* flush Flush drawing updates for this frame to the screen.
|
||||||
* will always be FALSE if ROOTLESS_TRACK_DAMAGE is set.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*RootlessStopDrawingProc)
|
typedef void (*RootlessStopDrawingProc)
|
||||||
(RootlessFrameID wid, Bool flush);
|
(RootlessFrameID wid, Bool flush);
|
||||||
|
@ -239,15 +234,13 @@ typedef void (*RootlessStopDrawingProc)
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* pDamage Region containing all the changed pixels in frame-lcoal
|
* pDamage Region containing all the changed pixels in frame-lcoal
|
||||||
* coordinates. This is clipped to the window's clip. This
|
* coordinates. This is clipped to the window's clip.
|
||||||
* will be NULL if ROOTLESS_TRACK_DAMAGE is not set.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*RootlessUpdateRegionProc)
|
typedef void (*RootlessUpdateRegionProc)
|
||||||
(RootlessFrameID wid, RegionPtr pDamage);
|
(RootlessFrameID wid, RegionPtr pDamage);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mark damaged rectangles as requiring redisplay to screen.
|
* Mark damaged rectangles as requiring redisplay to screen.
|
||||||
* This will only be called if ROOTLESS_TRACK_DAMAGE is not set.
|
|
||||||
*
|
*
|
||||||
* wid Frame id
|
* wid Frame id
|
||||||
* nrects Number of damaged rectangles
|
* nrects Number of damaged rectangles
|
||||||
|
@ -374,9 +367,7 @@ typedef struct _RootlessFrameProcs {
|
||||||
RootlessStartDrawingProc StartDrawing;
|
RootlessStartDrawingProc StartDrawing;
|
||||||
RootlessStopDrawingProc StopDrawing;
|
RootlessStopDrawingProc StopDrawing;
|
||||||
RootlessUpdateRegionProc UpdateRegion;
|
RootlessUpdateRegionProc UpdateRegion;
|
||||||
#ifndef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RootlessDamageRectsProc DamageRects;
|
RootlessDamageRectsProc DamageRects;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Optional frame functions */
|
/* Optional frame functions */
|
||||||
RootlessSwitchWindowProc SwitchWindow;
|
RootlessSwitchWindowProc SwitchWindow;
|
||||||
|
@ -426,8 +417,7 @@ void RootlessStartDrawing(WindowPtr pWindow);
|
||||||
/*
|
/*
|
||||||
* Finish drawing to a window's backing buffer.
|
* Finish drawing to a window's backing buffer.
|
||||||
*
|
*
|
||||||
* flush If true and ROOTLESS_TRACK_DAMAGE is set, damaged areas
|
* flush If true, damaged areas are flushed to the screen.
|
||||||
* are flushed to the screen.
|
|
||||||
*/
|
*/
|
||||||
void RootlessStopDrawing(WindowPtr pWindow, Bool flush);
|
void RootlessStopDrawing(WindowPtr pWindow, Bool flush);
|
||||||
|
|
||||||
|
|
|
@ -305,16 +305,11 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
|
||||||
if (in == rgnIN) {
|
if (in == rgnIN) {
|
||||||
/* clip totally contains pRegion */
|
/* clip totally contains pRegion */
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionUnion(&winRec->damage,
|
|
||||||
&winRec->damage, (pRegion));
|
|
||||||
#else
|
|
||||||
SCREENREC(pWindow->drawable.pScreen)->imp->
|
SCREENREC(pWindow->drawable.pScreen)->imp->
|
||||||
DamageRects(winRec->wid,
|
DamageRects(winRec->wid,
|
||||||
RegionNumRects(pRegion),
|
RegionNumRects(pRegion),
|
||||||
RegionRects(pRegion),
|
RegionRects(pRegion),
|
||||||
-winRec->x, -winRec->y);
|
-winRec->x, -winRec->y);
|
||||||
#endif
|
|
||||||
|
|
||||||
RootlessQueueRedisplay(pTop->drawable.pScreen);
|
RootlessQueueRedisplay(pTop->drawable.pScreen);
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -331,16 +326,11 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion)
|
||||||
RegionNull(&clipped);
|
RegionNull(&clipped);
|
||||||
RegionIntersect(&clipped, &pWindow->borderClip, pRegion);
|
RegionIntersect(&clipped, &pWindow->borderClip, pRegion);
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionUnion(&winRec->damage,
|
|
||||||
&winRec->damage, (pRegion));
|
|
||||||
#else
|
|
||||||
SCREENREC(pWindow->drawable.pScreen)->imp->
|
SCREENREC(pWindow->drawable.pScreen)->imp->
|
||||||
DamageRects(winRec->wid,
|
DamageRects(winRec->wid,
|
||||||
RegionNumRects(&clipped),
|
RegionNumRects(&clipped),
|
||||||
RegionRects(&clipped),
|
RegionRects(&clipped),
|
||||||
-winRec->x, -winRec->y);
|
-winRec->x, -winRec->y);
|
||||||
#endif
|
|
||||||
|
|
||||||
RegionUninit(&clipped);
|
RegionUninit(&clipped);
|
||||||
|
|
||||||
|
@ -415,32 +405,7 @@ RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h)
|
||||||
void
|
void
|
||||||
RootlessRedisplay(WindowPtr pWindow)
|
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);
|
RootlessStopDrawing(pWindow, TRUE);
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
# define ROOTLESS_PROTECT_ALPHA TRUE
|
# define ROOTLESS_PROTECT_ALPHA TRUE
|
||||||
# define ROOTLESS_REDISPLAY_DELAY 10
|
# define ROOTLESS_REDISPLAY_DELAY 10
|
||||||
# define ROOTLESS_RESIZE_GRAVITY TRUE
|
# define ROOTLESS_RESIZE_GRAVITY TRUE
|
||||||
# undef ROOTLESS_TRACK_DAMAGE
|
|
||||||
/*# define ROOTLESSDEBUG*/
|
/*# define ROOTLESSDEBUG*/
|
||||||
|
|
||||||
/* Bit mask for alpha channel with a particular number of bits per
|
/* Bit mask for alpha channel with a particular number of bits per
|
||||||
|
@ -56,7 +55,6 @@
|
||||||
# define ROOTLESS_PROTECT_ALPHA NO
|
# define ROOTLESS_PROTECT_ALPHA NO
|
||||||
# define ROOTLESS_REDISPLAY_DELAY 10
|
# define ROOTLESS_REDISPLAY_DELAY 10
|
||||||
# undef ROOTLESS_RESIZE_GRAVITY
|
# undef ROOTLESS_RESIZE_GRAVITY
|
||||||
# undef ROOTLESS_TRACK_DAMAGE
|
|
||||||
/*# define ROOTLESSDEBUG*/
|
/*# define ROOTLESSDEBUG*/
|
||||||
|
|
||||||
# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
|
# define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0)
|
||||||
|
|
|
@ -180,11 +180,6 @@ static void
|
||||||
RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec)
|
RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec)
|
||||||
{
|
{
|
||||||
SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid);
|
SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid);
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionUninit(&winRec->damage);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
free(winRec);
|
free(winRec);
|
||||||
SETWINREC(pWin, NULL);
|
SETWINREC(pWin, NULL);
|
||||||
}
|
}
|
||||||
|
@ -341,15 +336,6 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y)
|
||||||
|
|
||||||
winRec->pixmap->devPrivate.ptr = winRec->pixelData;
|
winRec->pixmap->devPrivate.ptr = winRec->pixelData;
|
||||||
SetPixmapBaseToScreen(winRec->pixmap, x - bw, y - bw);
|
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->width = d->width + 2*bw;
|
||||||
winRec->height = d->height + 2*bw;
|
winRec->height = d->height + 2*bw;
|
||||||
winRec->borderWidth = bw;
|
winRec->borderWidth = bw;
|
||||||
|
|
||||||
#ifdef ROOTLESS_TRACK_DAMAGE
|
|
||||||
RegionNull(&winRec->damage);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue