Add projective transforms to RandR DIX/DDX API.
New RRCrtcGetTransform function in DIX that DDX can use to get the pending transform. The DDX code should be complete; the DIX code is just a stub at this point.
This commit is contained in:
parent
9c7ac47b87
commit
e063162e80
|
@ -261,7 +261,7 @@ PictureTransformIsInverse (char *where, PictTransform *a, PictTransform *b)
|
||||||
ErrorF (" * ");
|
ErrorF (" * ");
|
||||||
PictureTransformErrorF (b);
|
PictureTransformErrorF (b);
|
||||||
ErrorF (" = ");
|
ErrorF (" = ");
|
||||||
PictureTransformErrorF (a);
|
PictureTransformErrorF (&t);
|
||||||
ErrorF ("\n");
|
ErrorF ("\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -331,10 +331,11 @@ xf86CrtcDamageShadow (xf86CrtcPtr crtc)
|
||||||
RegionRec damage_region;
|
RegionRec damage_region;
|
||||||
ScreenPtr pScreen = pScrn->pScreen;
|
ScreenPtr pScreen = pScrn->pScreen;
|
||||||
|
|
||||||
damage_box.x1 = crtc->x;
|
damage_box.x1 = 0;
|
||||||
damage_box.x2 = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation);
|
damage_box.x2 = crtc->mode.HDisplay;
|
||||||
damage_box.y1 = crtc->y;
|
damage_box.y1 = 0;
|
||||||
damage_box.y2 = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation);
|
damage_box.y2 = crtc->mode.VDisplay;
|
||||||
|
PictureTransformBounds (&damage_box, &crtc->crtc_to_framebuffer);
|
||||||
REGION_INIT (pScreen, &damage_region, &damage_box, 1);
|
REGION_INIT (pScreen, &damage_region, &damage_box, 1);
|
||||||
DamageRegionAppend(&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
DamageRegionAppend(&(*pScreen->GetScreenPixmap)(pScreen)->drawable,
|
||||||
&damage_region);
|
&damage_region);
|
||||||
|
@ -401,7 +402,7 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||||
|
|
||||||
if (crtc->rotation != RR_Rotate_0 && crtc->enabled)
|
if (crtc->transform_in_use && crtc->enabled)
|
||||||
{
|
{
|
||||||
RegionRec crtc_damage;
|
RegionRec crtc_damage;
|
||||||
|
|
||||||
|
@ -582,6 +583,17 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RANDR_12_INTERFACE
|
||||||
|
{
|
||||||
|
PictTransform user_forward, user_reverse;
|
||||||
|
if (RRCrtcGetTransform (crtc->randr_crtc, &user_forward, &user_reverse))
|
||||||
|
{
|
||||||
|
PictureTransformIsInverse ("user", &user_forward, &user_reverse);
|
||||||
|
PictureTransformMultiply (&crtc_to_fb, &user_forward, &crtc_to_fb);
|
||||||
|
PictureTransformMultiply (&fb_to_crtc, &fb_to_crtc, &user_reverse);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* If the untranslated transformation is the identity,
|
* If the untranslated transformation is the identity,
|
||||||
* disable the shadow buffer
|
* disable the shadow buffer
|
||||||
|
|
|
@ -586,6 +586,20 @@ RRCrtcGammaSetSize (RRCrtcPtr crtc,
|
||||||
void
|
void
|
||||||
RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
|
RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return crtc transform
|
||||||
|
*/
|
||||||
|
Bool
|
||||||
|
RRCrtcGetTransform (RRCrtcPtr crtc,
|
||||||
|
PictTransformPtr crtc_to_fb,
|
||||||
|
PictTransformPtr fb_to_crtc);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mark the pending transform as current
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
RRCrtcPostPendingTransform (RRCrtcPtr crtc);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Destroy a Crtc at shutdown
|
* Destroy a Crtc at shutdown
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -358,6 +358,25 @@ RRCrtcSet (RRCrtcPtr crtc,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return crtc transform
|
||||||
|
*/
|
||||||
|
Bool
|
||||||
|
RRCrtcGetTransform (RRCrtcPtr crtc,
|
||||||
|
PictTransformPtr crtc_to_fb,
|
||||||
|
PictTransformPtr fb_to_crtc)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mark the pending transform as current
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
RRCrtcPostPendingTransform (RRCrtcPtr crtc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Destroy a Crtc at shutdown
|
* Destroy a Crtc at shutdown
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue