summaryrefslogtreecommitdiff
path: root/randr/rrcrtc.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-03-17 23:04:49 -0700
committerKeith Packard <keithp@keithp.com>2008-11-24 13:24:38 -0800
commit6d3a9e40a4b9ec455af11cce31e4aa616c93db32 (patch)
treec4657e8fa10bee188b17470087605541450eceb7 /randr/rrcrtc.c
parent160252d94f04acc95f0a4e0f884ff565a5aa0744 (diff)
Compute matrix inversion instead of using wire version in RRCrtcTransformSet
It doesn't make sense to have the client invert this matrix when the server can do so reasonably efficiently. This avoids weird fixed point rounding errors when testing the transform against its inverse. Now to fix the protocol.
Diffstat (limited to 'randr/rrcrtc.c')
-rw-r--r--randr/rrcrtc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index b71588402..b8b9ec03a 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -608,8 +608,6 @@ RRCrtcTransformSet (RRCrtcPtr crtc,
PictFilterPtr filter = NULL;
int width = 0, height = 0;
- if (!PictureTransformIsInverse (transform, inverse))
- return BadMatch;
if (filter_len)
{
filter = PictureFindFilter (crtc->pScreen,
@@ -1229,7 +1227,8 @@ ProcRRSetCrtcTransform (ClientPtr client)
return RRErrorBase + BadRRCrtc;
PictTransform_from_xRenderTransform (&transform, &stuff->transform);
- PictTransform_from_xRenderTransform (&inverse, &stuff->inverse);
+ if (!PictureTransformInvert (&inverse, &transform))
+ return BadMatch;
filter = (char *) (stuff + 1);
nbytes = stuff->nbytesFilter;