From c9204c8fcfeed1209b42aad2426e35c4b0a24c56 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 17 Mar 2008 16:14:15 -0700 Subject: [PATCH] Actually use filter kernel size to expand transform redisplay box --- hw/xfree86/modes/xf86Rotate.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index b00d11a39..5e8174cb9 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -118,10 +118,10 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region) BoxRec dst_box; dst_box = *b; - dst_box.x1 -= crtc->filter_width >> 2; - dst_box.x2 += crtc->filter_width >> 2; - dst_box.y1 -= crtc->filter_width >> 2; - dst_box.y2 += crtc->filter_width >> 2; + dst_box.x1 -= crtc->filter_width >> 1; + dst_box.x2 += crtc->filter_width >> 1; + dst_box.y1 -= crtc->filter_height >> 1; + dst_box.y2 += crtc->filter_height >> 1; PictureTransformBounds (&dst_box, &crtc->framebuffer_to_crtc); CompositePicture (PictOpSrc, src, NULL, dst, @@ -391,6 +391,11 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation) } } else new_filter = transform->filter; + if (new_filter) + { + new_width = new_filter->width; + new_height = new_filter->height; + } PictureTransformMultiply (&crtc_to_fb, &transform->transform, &crtc_to_fb); PictureTransformMultiply (&fb_to_crtc, &fb_to_crtc, &transform->inverse); }