xf86: store scanout pixmap in the xf86 struct as well.

This is so we can tell the scanout pixmap has changed between calls
to the crtc set function.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2012-06-26 09:53:54 +01:00
parent 426bc0a28e
commit 22f02120eb
2 changed files with 9 additions and 1 deletions

View File

@ -225,7 +225,7 @@ typedef struct _xf86CrtcFuncs {
} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
#define XF86_CRTC_VERSION 4
#define XF86_CRTC_VERSION 5
struct _xf86Crtc {
/**
@ -376,6 +376,10 @@ struct _xf86Crtc {
* Added in ABI version 4
*/
Bool driverIsPerformingTransform;
/* Added in ABI version 5
*/
PixmapPtr current_scanout;
};
typedef struct _xf86OutputFuncs {

View File

@ -1157,6 +1157,9 @@ xf86RandR12CrtcSet(ScreenPtr pScreen,
if (rotation != crtc->rotation)
changed = TRUE;
if (crtc->current_scanout != randr_crtc->scanout_pixmap)
changed = TRUE;
transform = RRCrtcGetTransform(randr_crtc);
if ((transform != NULL) != crtc->transformPresent)
changed = TRUE;
@ -1218,6 +1221,7 @@ xf86RandR12CrtcSet(ScreenPtr pScreen,
*/
crtc->desiredMode = mode;
crtc->desiredRotation = rotation;
crtc->current_scanout = randr_crtc->scanout_pixmap;
if (transform) {
crtc->desiredTransform = *transform;
crtc->desiredTransformPresent = TRUE;