diff options
author | Keith Packard <keithp@keithp.com> | 2008-11-24 13:08:48 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-11-25 22:17:58 -0800 |
commit | 9ffc6719390df8fdd0a5295a7a7a0eaea792be45 (patch) | |
tree | 5e8458e61270bc1c8a2473b51ead0562a9414a96 /randr | |
parent | c4b9ab6bf56139fdd8c7c584a6f523c6766cddd6 (diff) |
Move matrix operations from X server to pixman 0.13.2
pixman 0.13.2 now holds all of the matrix operations. This leaves
the protocol conversion routines and some ABI stubs in place
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'randr')
-rw-r--r-- | randr/rrcrtc.c | 24 | ||||
-rw-r--r-- | randr/rrproperty.c | 4 | ||||
-rw-r--r-- | randr/rrtransform.c | 66 |
3 files changed, 47 insertions, 47 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index c43163706..5d270ce12 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -91,9 +91,9 @@ RRCrtcCreate (ScreenPtr pScreen, void *devPrivate) crtc->devPrivate = devPrivate; RRTransformInit (&crtc->client_pending_transform); RRTransformInit (&crtc->client_current_transform); - PictureTransformInitIdentity (&crtc->transform); - pict_f_transform_init_identity (&crtc->f_transform); - pict_f_transform_init_identity (&crtc->f_inverse); + pixman_transform_init_identity (&crtc->transform); + pixman_f_transform_init_identity (&crtc->f_transform); + pixman_f_transform_init_identity (&crtc->f_inverse); if (!AddResource (crtc->id, RRCrtcType, (pointer) crtc)) return NULL; @@ -395,7 +395,7 @@ RRCrtcGetTransform (RRCrtcPtr crtc) { RRTransformPtr transform = &crtc->client_pending_transform; - if (PictureTransformIsIdentity (&transform->transform)) + if (pixman_transform_is_identity (&transform->transform)) return NULL; return transform; } @@ -508,7 +508,7 @@ RRModeGetScanoutSize (RRModePtr mode, PictTransformPtr transform, box.x2 = mode->mode.width; box.y2 = mode->mode.height; - PictureTransformBounds (&box, transform); + pixman_transform_bounds (transform, &box); *width = box.x2 - box.x1; *height = box.y2 - box.y1; } @@ -558,8 +558,8 @@ RRCrtcGammaSetSize (RRCrtcPtr crtc, int RRCrtcTransformSet (RRCrtcPtr crtc, PictTransformPtr transform, - struct pict_f_transform *f_transform, - struct pict_f_transform *f_inverse, + struct pixman_f_transform *f_transform, + struct pixman_f_transform *f_inverse, char *filter_name, int filter_len, xFixed *params, @@ -909,7 +909,7 @@ ProcRRSetCrtcConfig (ClientPtr client) int source_width; int source_height; PictTransform transform; - struct pict_f_transform f_transform, f_inverse; + struct pixman_f_transform f_transform, f_inverse; RRTransformCompute (stuff->x, stuff->y, mode->mode.width, mode->mode.height, @@ -1011,7 +1011,7 @@ ProcRRGetCrtcGamma (ClientPtr client) RRCrtcPtr crtc; int n; unsigned long len; - char *extra; + char *extra = NULL; REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq); crtc = LookupCrtc (client, stuff->crtc, DixReadAccess); @@ -1083,7 +1083,7 @@ ProcRRSetCrtcTransform (ClientPtr client) REQUEST(xRRSetCrtcTransformReq); RRCrtcPtr crtc; PictTransform transform; - struct pict_f_transform f_transform, f_inverse; + struct pixman_f_transform f_transform, f_inverse; char *filter; int nbytes; xFixed *params; @@ -1095,8 +1095,8 @@ ProcRRSetCrtcTransform (ClientPtr client) return RRErrorBase + BadRRCrtc; PictTransform_from_xRenderTransform (&transform, &stuff->transform); - pict_f_transform_from_pixman_transform (&f_transform, &transform); - if (!pict_f_transform_invert (&f_inverse, &f_transform)) + pixman_f_transform_from_pixman_transform (&f_transform, &transform); + if (!pixman_f_transform_invert (&f_inverse, &f_transform)) return BadMatch; filter = (char *) (stuff + 1); diff --git a/randr/rrproperty.c b/randr/rrproperty.c index 9bc7254f9..6ca7cc900 100644 --- a/randr/rrproperty.c +++ b/randr/rrproperty.c @@ -461,7 +461,7 @@ ProcRRQueryOutputProperty (ClientPtr client) xRRQueryOutputPropertyReply rep; RROutputPtr output; RRPropertyPtr prop; - char *extra; + char *extra = NULL; REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq); @@ -613,7 +613,7 @@ ProcRRGetOutputProperty (ClientPtr client) unsigned long n, len, ind; RROutputPtr output; xRRGetOutputPropertyReply reply; - char *extra; + char *extra = NULL; REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq); if (stuff->delete) diff --git a/randr/rrtransform.c b/randr/rrtransform.c index 836a7aef4..a901df4ac 100644 --- a/randr/rrtransform.c +++ b/randr/rrtransform.c @@ -26,9 +26,9 @@ void RRTransformInit (RRTransformPtr transform) { - PictureTransformInitIdentity (&transform->transform); - pict_f_transform_init_identity (&transform->f_transform); - pict_f_transform_init_identity (&transform->f_inverse); + pixman_transform_init_identity (&transform->transform); + pixman_f_transform_init_identity (&transform->f_transform); + pixman_f_transform_init_identity (&transform->f_inverse); transform->filter = NULL; transform->params = NULL; transform->nparams = 0; @@ -44,9 +44,9 @@ RRTransformFini (RRTransformPtr transform) Bool RRTransformEqual (RRTransformPtr a, RRTransformPtr b) { - if (a && PictureTransformIsIdentity (&a->transform)) + if (a && pixman_transform_is_identity (&a->transform)) a = NULL; - if (b && PictureTransformIsIdentity (&b->transform)) + if (b && pixman_transform_is_identity (&b->transform)) b = NULL; if (a == NULL && b == NULL) return TRUE; @@ -95,7 +95,7 @@ RRTransformSetFilter (RRTransformPtr dst, Bool RRTransformCopy (RRTransformPtr dst, RRTransformPtr src) { - if (src && PictureTransformIsIdentity (&src->transform)) + if (src && pixman_transform_is_identity (&src->transform)) src = NULL; if (src) @@ -111,9 +111,9 @@ RRTransformCopy (RRTransformPtr dst, RRTransformPtr src) { if (!RRTransformSetFilter (dst, NULL, NULL, 0, 0, 0)) return FALSE; - PictureTransformInitIdentity (&dst->transform); - pict_f_transform_init_identity (&dst->f_transform); - pict_f_transform_init_identity (&dst->f_inverse); + pixman_transform_init_identity (&dst->transform); + pixman_f_transform_init_identity (&dst->f_transform); + pixman_f_transform_init_identity (&dst->f_inverse); } return TRUE; } @@ -136,20 +136,20 @@ RRTransformCompute (int x, RRTransformPtr rr_transform, PictTransformPtr transform, - struct pict_f_transform *f_transform, - struct pict_f_transform *f_inverse) + struct pixman_f_transform *f_transform, + struct pixman_f_transform *f_inverse) { PictTransform t_transform, inverse; - struct pict_f_transform tf_transform, tf_inverse; + struct pixman_f_transform tf_transform, tf_inverse; if (!transform) transform = &t_transform; if (!f_transform) f_transform = &tf_transform; if (!f_inverse) f_inverse = &tf_inverse; - PictureTransformInitIdentity (transform); - PictureTransformInitIdentity (&inverse); - pict_f_transform_init_identity (f_transform); - pict_f_transform_init_identity (f_inverse); + pixman_transform_init_identity (transform); + pixman_transform_init_identity (&inverse); + pixman_f_transform_init_identity (f_transform); + pixman_f_transform_init_identity (f_inverse); if (rotation != RR_Rotate_0) { double f_rot_cos, f_rot_sin, f_rot_dx, f_rot_dy; @@ -186,10 +186,10 @@ RRTransformCompute (int x, break; } - PictureTransformRotate (transform, &inverse, rot_cos, rot_sin); - PictureTransformTranslate (transform, &inverse, rot_dx, rot_dy); - pict_f_transform_rotate (f_transform, f_inverse, f_rot_cos, f_rot_sin); - pict_f_transform_translate (f_transform, f_inverse, f_rot_dx, f_rot_dy); + pixman_transform_rotate (transform, &inverse, rot_cos, rot_sin); + pixman_transform_translate (transform, &inverse, rot_dx, rot_dy); + pixman_f_transform_rotate (f_transform, f_inverse, f_rot_cos, f_rot_sin); + pixman_f_transform_translate (f_transform, f_inverse, f_rot_dx, f_rot_dy); /* reflection */ f_scale_x = 1; @@ -225,35 +225,35 @@ RRTransformCompute (int x, } } - PictureTransformScale (transform, &inverse, scale_x, scale_y); - pict_f_transform_scale (f_transform, f_inverse, f_scale_x, f_scale_y); - PictureTransformTranslate (transform, &inverse, scale_dx, scale_dy); - pict_f_transform_translate (f_transform, f_inverse, f_scale_dx, f_scale_dy); + pixman_transform_scale (transform, &inverse, scale_x, scale_y); + pixman_f_transform_scale (f_transform, f_inverse, f_scale_x, f_scale_y); + pixman_transform_translate (transform, &inverse, scale_dx, scale_dy); + pixman_f_transform_translate (f_transform, f_inverse, f_scale_dx, f_scale_dy); } #ifdef RANDR_12_INTERFACE if (rr_transform) { - PictureTransformMultiply (transform, transform, &rr_transform->transform); - pict_f_transform_multiply (f_transform, f_transform, &rr_transform->f_transform); - pict_f_transform_multiply (f_inverse, &rr_transform->f_inverse, f_inverse); + pixman_transform_multiply (transform, transform, &rr_transform->transform); + pixman_f_transform_multiply (f_transform, f_transform, &rr_transform->f_transform); + pixman_f_transform_multiply (f_inverse, &rr_transform->f_inverse, f_inverse); } #endif /* * Compute the class of the resulting transform */ - if (PictureTransformIsIdentity (transform)) + if (pixman_transform_is_identity (transform)) { - PictureTransformInitTranslate (transform, F ( x), F ( y)); + pixman_transform_init_translate (transform, F ( x), F ( y)); - pict_f_transform_init_translate (f_transform, F( x), F( y)); - pict_f_transform_init_translate (f_inverse, F(-x), F(-y)); + pixman_f_transform_init_translate (f_transform, F( x), F( y)); + pixman_f_transform_init_translate (f_inverse, F(-x), F(-y)); return FALSE; } else { - PictureTransformTranslate (&inverse, transform, x, y); - pict_f_transform_translate (f_inverse, f_transform, x, y); + pixman_transform_translate (&inverse, transform, x, y); + pixman_f_transform_translate (f_inverse, f_transform, x, y); return TRUE; } } |