randr: Add RRHasScanoutPixmap helper function
This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
a52530a655
commit
2eefb53f58
|
@ -725,6 +725,12 @@ extern _X_EXPORT void
|
|||
extern _X_EXPORT Bool
|
||||
RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable);
|
||||
|
||||
/*
|
||||
* Return if the screen has any scanout_pixmap's attached
|
||||
*/
|
||||
extern _X_EXPORT Bool
|
||||
RRHasScanoutPixmap(ScreenPtr pScreen);
|
||||
|
||||
/*
|
||||
* Crtc dispatch
|
||||
*/
|
||||
|
|
|
@ -1945,3 +1945,22 @@ RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Bool
|
||||
RRHasScanoutPixmap(ScreenPtr pScreen)
|
||||
{
|
||||
rrScrPriv(pScreen);
|
||||
int i;
|
||||
|
||||
if (!pScreen->is_output_slave)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; i < pScrPriv->numCrtcs; i++) {
|
||||
RRCrtcPtr crtc = pScrPriv->crtcs[i];
|
||||
|
||||
if (crtc->scanout_pixmap)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue