summaryrefslogtreecommitdiff
path: root/randr/randrstr.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-03-19 00:46:35 -0700
committerKeith Packard <keithp@keithp.com>2008-11-24 13:24:40 -0800
commit49db14e4ac26070ed86088419483888dda18b603 (patch)
tree24f45d2c6117e204cf489633ac29eedccce9688f /randr/randrstr.h
parent6f734aecaec4f5c6152c3ebca197ef65bb4523da (diff)
Handle RandR transform matrices in floating point.
RandR matrix computations lose too much precision in fixed point; computations using the inverted matrix can be as much as 10 pixels off. Convert them to double precision values and pass those around. These API changes are fairly heavyweight; the official Render interface remains fixed point, so the fixed point matrix comes along for the ride everywhere.
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r--randr/randrstr.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 792c3d654..5ac983d90 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -107,7 +107,8 @@ struct _rrProperty {
struct _rrTransform {
PictTransform transform;
- PictTransform inverse;
+ struct pict_f_transform f_transform;
+ struct pict_f_transform f_inverse;
PictFilterPtr filter;
xFixed *params;
int nparams;
@@ -134,7 +135,8 @@ struct _rrCrtc {
RRTransformRec client_pending_transform;
RRTransformRec client_current_transform;
PictTransform transform;
- PictTransform inverse;
+ struct pict_f_transform f_transform;
+ struct pict_f_transform f_inverse;
};
struct _rrOutput {
@@ -616,14 +618,16 @@ RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
* Return TRUE if the resulting transform is not a simple translation.
*/
Bool
-RRComputeTransform (RRModePtr mode,
- Rotation rotation,
- int x,
- int y,
- PictTransformPtr client_transform,
- PictTransformPtr client_inverse,
- PictTransformPtr transform,
- PictTransformPtr inverse);
+RRComputeTransform (int x,
+ int y,
+ int width,
+ int height,
+ Rotation rotation,
+ RRTransformPtr rr_transform,
+
+ PictTransformPtr transform,
+ struct pict_f_transform *f_transform,
+ struct pict_f_transform *f_inverse);
/*
* Return crtc transform
@@ -657,7 +661,8 @@ RRCrtcDestroy (RRCrtcPtr crtc);
int
RRCrtcTransformSet (RRCrtcPtr crtc,
PictTransformPtr transform,
- PictTransformPtr inverse,
+ struct pict_f_transform *f_transform,
+ struct pict_f_transform *f_inverse,
char *filter,
int filter_len,
xFixed *params,