Re: [PATCH 1/2] rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.
Reviewed-by: Jeremy Huddleston On Jul 14, 2010, at 11:44, Jamey Sharp wrote: Signed-off-by: Jamey Sharp Cc: Jeremy Huddleston Cc: Jon TURNEY --- miext/rootless/rootlessConfig.h |2 -- hw/xwin/winscrinit.c|2 -- miext/rootless/README.txt | 19 ++- miext/rootless/rootless.h | 16 +++- miext/rootless/rootlessCommon.c | 35 --- miext/rootless/rootlessWindow.c | 18 -- 6 files changed, 5 insertions(+), 87 deletions(-) diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/ rootlessConfig.h index 50bac3f..9082ac2 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 ? 0xFF00 : 0) diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 47e9b6d..1b40933 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -54,9 +54,7 @@ winMWExtWMProcs = { winMWExtWMStartDrawing, winMWExtWMStopDrawing, winMWExtWMUpdateRegion, -#ifndef ROOTLESS_TRACK_DAMAGE winMWExtWMDamageRects, -#endif winMWExtWMRootlessSwitchWindow, NULL,//winMWExtWMDoReorderWindow, NULL,//winMWExtWMHideWindow, diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt index 2c3fbb0..8a6df74 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 00eac4e..2e6e782 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
[PATCH 1/2] rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.
Signed-off-by: Jamey Sharp Cc: Jeremy Huddleston Cc: Jon TURNEY --- miext/rootless/rootlessConfig.h |2 -- hw/xwin/winscrinit.c|2 -- miext/rootless/README.txt | 19 ++- miext/rootless/rootless.h | 16 +++- miext/rootless/rootlessCommon.c | 35 --- miext/rootless/rootlessWindow.c | 18 -- 6 files changed, 5 insertions(+), 87 deletions(-) diff --git a/miext/rootless/rootlessConfig.h b/miext/rootless/rootlessConfig.h index 50bac3f..9082ac2 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 ? 0xFF00 : 0) diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index 47e9b6d..1b40933 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -54,9 +54,7 @@ winMWExtWMProcs = { winMWExtWMStartDrawing, winMWExtWMStopDrawing, winMWExtWMUpdateRegion, -#ifndef ROOTLESS_TRACK_DAMAGE winMWExtWMDamageRects, -#endif winMWExtWMRootlessSwitchWindow, NULL,//winMWExtWMDoReorderWindow, NULL,//winMWExtWMHideWindow, diff --git a/miext/rootless/README.txt b/miext/rootless/README.txt index 2c3fbb0..8a6df74 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 00eac4e..2e6e782 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 - *