Keep rotation wrappers in place while transforms are in use
LeaveVT/EnterVT cycles will free/realloc shadow frame buffers. Because of this, the presense/absence of that data is insufficient to know whether the screen function wrappers are necessary. Instead, the 'transform_in_use' flag should be used. This patch also adds 'xf86RotateFreeShadow' for drivers to use at LeaveVT time to free the rotation data; it will be reallocated on EnterVT.
This commit is contained in:
parent
d5ab89f4f1
commit
f65a1a62f9
|
@ -942,6 +942,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
|
||||||
SYMFUNC(xf86CrtcDestroy)
|
SYMFUNC(xf86CrtcDestroy)
|
||||||
SYMFUNC(xf86CrtcInUse)
|
SYMFUNC(xf86CrtcInUse)
|
||||||
SYMFUNC(xf86CrtcSetScreenSubpixelOrder)
|
SYMFUNC(xf86CrtcSetScreenSubpixelOrder)
|
||||||
|
SYMFUNC(xf86RotateFreeShadow)
|
||||||
SYMFUNC(xf86RotateCloseScreen)
|
SYMFUNC(xf86RotateCloseScreen)
|
||||||
SYMFUNC(xf86CrtcRotate)
|
SYMFUNC(xf86CrtcRotate)
|
||||||
SYMFUNC(xf86CrtcSetMode)
|
SYMFUNC(xf86CrtcSetMode)
|
||||||
|
|
|
@ -664,6 +664,12 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
|
||||||
Bool
|
Bool
|
||||||
xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation);
|
xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* free shadow memory allocated for all crtcs
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xf86RotateFreeShadow(ScrnInfoPtr pScrn);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clean up rotation during CloseScreen
|
* Clean up rotation during CloseScreen
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -457,8 +457,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (c = 0; c < xf86_config->num_crtc; c++)
|
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||||
if (xf86_config->crtc[c]->rotatedPixmap ||
|
if (xf86_config->crtc[c]->transform_in_use)
|
||||||
xf86_config->crtc[c]->rotatedData)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -478,6 +477,24 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_X_EXPORT void
|
||||||
|
xf86RotateFreeShadow(ScrnInfoPtr pScrn)
|
||||||
|
{
|
||||||
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
|
int c;
|
||||||
|
|
||||||
|
for (c = 0; c < config->num_crtc; c++) {
|
||||||
|
xf86CrtcPtr crtc = config->crtc[c];
|
||||||
|
|
||||||
|
if (crtc->rotatedPixmap || crtc->rotatedData) {
|
||||||
|
crtc->funcs->shadow_destroy(crtc, crtc->rotatedPixmap,
|
||||||
|
crtc->rotatedData);
|
||||||
|
crtc->rotatedPixmap = NULL;
|
||||||
|
crtc->rotatedData = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_X_EXPORT void
|
_X_EXPORT void
|
||||||
xf86RotateCloseScreen (ScreenPtr screen)
|
xf86RotateCloseScreen (ScreenPtr screen)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue