Suppress software cursor removal during rotated shadow buffer drawing.
This commit is contained in:
parent
28bb34eec6
commit
999b681cf3
|
@ -39,6 +39,7 @@
|
||||||
#include "xf86Crtc.h"
|
#include "xf86Crtc.h"
|
||||||
#include "xf86Modes.h"
|
#include "xf86Modes.h"
|
||||||
#include "xf86RandR12.h"
|
#include "xf86RandR12.h"
|
||||||
|
#include "misprite.h"
|
||||||
#include "X11/extensions/render.h"
|
#include "X11/extensions/render.h"
|
||||||
#define DPMS_SERVER
|
#define DPMS_SERVER
|
||||||
#include "X11/extensions/dpms.h"
|
#include "X11/extensions/dpms.h"
|
||||||
|
@ -279,7 +280,11 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||||
if (REGION_NOTEMPTY(pScreen, region))
|
if (REGION_NOTEMPTY(pScreen, region))
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
|
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(7,2,0,0,dummy)
|
||||||
|
/* Disable software cursor removal for this drawing */
|
||||||
|
miSpriteDrawInternal(pScreen, TRUE);
|
||||||
|
#endif
|
||||||
for (c = 0; c < xf86_config->num_crtc; c++)
|
for (c = 0; c < xf86_config->num_crtc; c++)
|
||||||
{
|
{
|
||||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
||||||
|
@ -304,6 +309,9 @@ xf86RotateRedisplay(ScreenPtr pScreen)
|
||||||
REGION_UNINIT (pScreen, &crtc_damage);
|
REGION_UNINIT (pScreen, &crtc_damage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(7,2,0,0,dummy)
|
||||||
|
miSpriteDrawInternal(pScreen, FALSE);
|
||||||
|
#endif
|
||||||
DamageEmpty(damage);
|
DamageEmpty(damage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -288,7 +288,8 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
|
||||||
|
|
||||||
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
|
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
|
||||||
|
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW &&
|
if (pScreenPriv->internalDraw == 0 &&
|
||||||
|
pDrawable->type == DRAWABLE_WINDOW &&
|
||||||
pScreenPriv->isUp &&
|
pScreenPriv->isUp &&
|
||||||
ORG_OVERLAP(&pScreenPriv->saved,pDrawable->x,pDrawable->y, sx, sy, w, h))
|
ORG_OVERLAP(&pScreenPriv->saved,pDrawable->x,pDrawable->y, sx, sy, w, h))
|
||||||
{
|
{
|
||||||
|
@ -318,7 +319,8 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart)
|
||||||
|
|
||||||
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
|
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
|
||||||
|
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp)
|
if (pScreenPriv->internalDraw == 0 &&
|
||||||
|
pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp)
|
||||||
{
|
{
|
||||||
DDXPointPtr pts;
|
DDXPointPtr pts;
|
||||||
int *widths;
|
int *widths;
|
||||||
|
@ -360,7 +362,8 @@ miSpriteSourceValidate (pDrawable, x, y, width, height)
|
||||||
|
|
||||||
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
|
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
|
||||||
|
|
||||||
if (pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp &&
|
if (pScreenPriv->internalDraw == 0 &&
|
||||||
|
pDrawable->type == DRAWABLE_WINDOW && pScreenPriv->isUp &&
|
||||||
ORG_OVERLAP(&pScreenPriv->saved, pDrawable->x, pDrawable->y,
|
ORG_OVERLAP(&pScreenPriv->saved, pDrawable->x, pDrawable->y,
|
||||||
x, y, width, height))
|
x, y, width, height))
|
||||||
{
|
{
|
||||||
|
@ -386,7 +389,8 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
/*
|
/*
|
||||||
* Damage will take care of destination check
|
* Damage will take care of destination check
|
||||||
*/
|
*/
|
||||||
if (pScreenPriv->isUp &&
|
if (pScreenPriv->internalDraw == 0 &&
|
||||||
|
pScreenPriv->isUp &&
|
||||||
RECT_IN_REGION (pScreen, prgnSrc, &pScreenPriv->saved) != rgnOUT)
|
RECT_IN_REGION (pScreen, prgnSrc, &pScreenPriv->saved) != rgnOUT)
|
||||||
{
|
{
|
||||||
SPRITE_DEBUG (("CopyWindow remove\n"));
|
SPRITE_DEBUG (("CopyWindow remove\n"));
|
||||||
|
@ -827,3 +831,28 @@ miSpriteComputeSaved (pScreen)
|
||||||
pScreenPriv->saved.x2 = pScreenPriv->saved.x1 + w + wpad * 2;
|
pScreenPriv->saved.x2 = pScreenPriv->saved.x1 + w + wpad * 2;
|
||||||
pScreenPriv->saved.y2 = pScreenPriv->saved.y1 + h + hpad * 2;
|
pScreenPriv->saved.y2 = pScreenPriv->saved.y1 + h + hpad * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables internal drawing support, which disables removal of the
|
||||||
|
* cursor when the screen pixmap is sourced from.
|
||||||
|
*
|
||||||
|
* This can be used to allow software cursors to be read by RandR rotation
|
||||||
|
* shadow code.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
miSpriteDrawInternal(ScreenPtr pScreen, Bool enable)
|
||||||
|
{
|
||||||
|
miSpriteScreenPtr pScreenPriv;
|
||||||
|
|
||||||
|
/* Check that miSprite has been set up this generation */
|
||||||
|
if (miSpriteGeneration != serverGeneration)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pScreenPriv = (miSpriteScreenPtr)
|
||||||
|
pScreen->devPrivates[miSpriteScreenIndex].ptr;
|
||||||
|
|
||||||
|
if (enable)
|
||||||
|
pScreenPriv->internalDraw++;
|
||||||
|
else
|
||||||
|
pScreenPriv->internalDraw--;
|
||||||
|
}
|
||||||
|
|
|
@ -92,3 +92,5 @@ extern Bool miSpriteInitialize(
|
||||||
miSpriteCursorFuncPtr /*cursorFuncs*/,
|
miSpriteCursorFuncPtr /*cursorFuncs*/,
|
||||||
miPointerScreenFuncPtr /*screenFuncs*/
|
miPointerScreenFuncPtr /*screenFuncs*/
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void miSpriteDrawInternal(ScreenPtr pScreen, Bool enable);
|
||||||
|
|
|
@ -76,6 +76,7 @@ typedef struct {
|
||||||
WindowPtr pCacheWin; /* window the cursor last seen in */
|
WindowPtr pCacheWin; /* window the cursor last seen in */
|
||||||
Bool isInCacheWin;
|
Bool isInCacheWin;
|
||||||
Bool checkPixels; /* check colormap collision */
|
Bool checkPixels; /* check colormap collision */
|
||||||
|
int internalDraw;
|
||||||
xColorItem colors[2];
|
xColorItem colors[2];
|
||||||
ColormapPtr pInstalledMap;
|
ColormapPtr pInstalledMap;
|
||||||
ColormapPtr pColormap;
|
ColormapPtr pColormap;
|
||||||
|
|
Loading…
Reference in New Issue