Fix transformation matrices for rotation at 90 and 270 degrees.

This commit is contained in:
Eric Anholt 2007-01-18 13:02:26 -08:00
parent d2ae2e2ccc
commit b296cd9b8f
1 changed files with 6 additions and 9 deletions

View File

@ -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;
}