diff options
author | Keith Packard <keithp@keithp.com> | 2008-03-18 15:35:44 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-11-24 13:24:39 -0800 |
commit | 197aa784694992f6bcfd194932309e440334c237 (patch) | |
tree | 2d61104d9a51e80430ebe651c5cd5f75026601c7 /randr | |
parent | e86c34663ef97e946a1129450105efa89a123af6 (diff) |
Report whether transforms are support from driver through extension to client
Add APIs to xf86RandR12 support and randr extension to record whether the
driver supports transforms, report that value in the RRGetCrtcTransform
reply.
Diffstat (limited to 'randr')
-rw-r--r-- | randr/randrstr.h | 7 | ||||
-rw-r--r-- | randr/rrcrtc.c | 15 |
2 files changed, 20 insertions, 2 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h index 17d0a8b44..792c3d654 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -130,6 +130,7 @@ struct _rrCrtc { CARD16 *gammaBlue; CARD16 *gammaGreen; void *devPrivate; + Bool transforms; RRTransformRec client_pending_transform; RRTransformRec client_current_transform; PictTransform transform; @@ -539,6 +540,12 @@ void RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations); /* + * Set whether transforms are allowed on a CRTC + */ +void +RRCrtcSetTransform (RRCrtcPtr crtc, Bool transforms); + +/* * Notify the extension that the Crtc has been reconfigured, * the driver calls this whenever it has updated the mode */ diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index b8b9ec03a..6559d51ce 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -164,6 +164,15 @@ RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations) } /* + * Set whether transforms are allowed on a CRTC + */ +void +RRCrtcSetTransform (RRCrtcPtr crtc, Bool transforms) +{ + crtc->transforms = transforms; +} + +/* * Notify the extension that the Crtc has been reconfigured, * the driver calls this whenever it has updated the mode */ @@ -608,6 +617,9 @@ RRCrtcTransformSet (RRCrtcPtr crtc, PictFilterPtr filter = NULL; int width = 0, height = 0; + if (!crtc->transforms) + return BadValue; + if (filter_len) { filter = PictureFindFilter (crtc->pScreen, @@ -1326,8 +1338,7 @@ ProcRRGetCrtcTransform (ClientPtr client) reply->sequenceNumber = client->sequence; reply->length = (CrtcTransformExtra + nextra) >> 2; - /* XXX deal with DDXen that can't do transforms */ - reply->hasTransforms = xTrue; + reply->hasTransforms = crtc->transforms; transform_encode (client, &reply->pendingTransform, &pending->transform); transform_encode (client, &reply->pendingInverse, &pending->inverse); |