From b296cd9b8f63ab80e8fe46fcfcdba2e9af846468 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 18 Jan 2007 13:02:26 -0800 Subject: [PATCH] Fix transformation matrices for rotation at 90 and 270 degrees. --- src/i830_xf86Rotate.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/i830_xf86Rotate.c b/src/i830_xf86Rotate.c index 670ad7ac..8da79b6f 100644 --- a/src/i830_xf86Rotate.c +++ b/src/i830_xf86Rotate.c @@ -144,23 +144,20 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region) transform.matrix[1][1] = IntToxFixed(1); break; case RR_Rotate_90: - /* XXX probably wrong */ - transform.matrix[0][1] = IntToxFixed(1); - transform.matrix[1][0] = IntToxFixed(-1); - transform.matrix[1][2] += IntToxFixed(crtc->mode.HDisplay); + transform.matrix[0][1] = IntToxFixed(-1); + transform.matrix[1][0] = IntToxFixed(1); + transform.matrix[0][2] += IntToxFixed(crtc->mode.VDisplay); break; case RR_Rotate_180: - /* XXX probably wrong */ transform.matrix[0][0] = IntToxFixed(-1); transform.matrix[1][1] = IntToxFixed(-1); transform.matrix[0][2] += IntToxFixed(crtc->mode.HDisplay); transform.matrix[1][2] += IntToxFixed(crtc->mode.VDisplay); break; case RR_Rotate_270: - /* XXX probably wrong */ - transform.matrix[0][1] = IntToxFixed(-1); - transform.matrix[1][0] = IntToxFixed(1); - transform.matrix[0][2] += IntToxFixed(crtc->mode.VDisplay); + transform.matrix[0][1] = IntToxFixed(1); + transform.matrix[1][0] = IntToxFixed(-1); + transform.matrix[1][2] += IntToxFixed(crtc->mode.VDisplay); break; }