When no shadow frame buffer is needed, the rotate block handler doesn't need to be called any more. Remove it from the chain.
Signed-off-by: Keith Packard <[email protected]> --- hw/xfree86/modes/xf86Rotate.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index 99dcb43..1627e61 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -243,9 +243,13 @@ xf86RotateBlockHandler(ScreenPtr pScreen, xf86RotateRedisplay(pScreen); (*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); - /* cannot avoid re-wrapping until all wrapping is audited */ - xf86_config->BlockHandler = pScreen->BlockHandler; - pScreen->BlockHandler = xf86RotateBlockHandler; + + /* Re-wrap if we still need this hook */ + if (xf86_config->rotation_damage != NULL) { + xf86_config->BlockHandler = pScreen->BlockHandler; + pScreen->BlockHandler = xf86RotateBlockHandler; + } else + xf86_config->BlockHandler = NULL; } void -- 1.9.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
