summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-01-18 13:02:26 -0800
committerEric Anholt <eric@anholt.net>2007-01-18 13:02:26 -0800
commitb296cd9b8f63ab80e8fe46fcfcdba2e9af846468 (patch)
treea06df14a19f94df2a2e8c60d7e9b5ecc6abe6c6f /src
parentd2ae2e2ccc3a8e7dc84745c235836cba150754d8 (diff)
Fix transformation matrices for rotation at 90 and 270 degrees.
Diffstat (limited to 'src')
-rw-r--r--src/i830_xf86Rotate.c15
1 files 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;
}