xserver: Branch 'master' - 4 commits
Søren Sandmann Pedersen
sandmann at kemper.freedesktop.org
Wed May 27 12:56:36 PDT 2009
fb/fbpict.c | 24 ++++++++----------------
hw/xfree86/modes/xf86RandR12.c | 26 ++++++++++++++++++++++++++
render/mipict.c | 4 ++--
3 files changed, 36 insertions(+), 18 deletions(-)
New commits:
commit e08c6a0752772745f35f7afcf6c2b1c927b91cc0
Author: Federico Mena Quintero <federico at novell.com>
Date: Mon May 4 19:24:47 2009 -0500
randr: bug #21554 - re-probe outputs when coming back from laptop unsuspend
Make xf86 RANDR wrap the EnterVT call chain, so it can re-probe the
outputs when a laptop comes back from suspend/unsuspend (actually, any
time that we enter our VT again). The X server should then send RR*
events to clients, so they can cope with a monitor that was unplugged
while the laptop was suspended.
Signed-off-by: Federico Mena Quintero <federico at novell.com>
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 1e3b70c..0de21e2 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -55,6 +55,13 @@ typedef struct _xf86RandR12Info {
int pointerY;
Rotation rotation; /* current mode */
Rotation supported_rotations; /* driver supported */
+
+ /* Used to wrap EnterVT so we can re-probe the outputs when a laptop unsuspends
+ * (actually, any time that we switch back into our VT).
+ *
+ * See https://bugs.freedesktop.org/show_bug.cgi?id=21554
+ */
+ xf86EnterVTProc *orig_EnterVT;
} XF86RandRInfoRec, *XF86RandRInfoPtr;
#ifdef RANDR_12_INTERFACE
@@ -1746,10 +1753,25 @@ xf86RandR12ChangeGamma(int scrnIndex, Gamma gamma)
}
static Bool
+xf86RandR12EnterVT (int screen_index, int flags)
+{
+ ScreenPtr pScreen = screenInfo.screens[screen_index];
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+
+ if (randrp->orig_EnterVT) {
+ if (!randrp->orig_EnterVT (screen_index, flags))
+ return FALSE;
+ }
+
+ return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
+}
+
+static Bool
xf86RandR12Init12 (ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
+ XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
rp->rrGetInfo = xf86RandR12GetInfo12;
rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
@@ -1767,6 +1789,10 @@ xf86RandR12Init12 (ScreenPtr pScreen)
rp->rrSetConfig = NULL;
pScrn->PointerMoved = xf86RandR12PointerMoved;
pScrn->ChangeGamma = xf86RandR12ChangeGamma;
+
+ randrp->orig_EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = xf86RandR12EnterVT;
+
if (!xf86RandR12CreateObjects12 (pScreen))
return FALSE;
commit b12010e10f38951358b48ff1076c026f943b7cc3
Merge: 6e69272... f1441b8...
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date: Wed May 27 15:56:30 2009 -0400
Merge branch 'master' of git+ssh://sandmann@git.freedesktop.org/git/xorg/xserver
commit 6e6927247359cc0db47501fb9d2dbb7856aa5985
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date: Wed May 27 15:51:19 2009 -0400
Fix alpha map computation in miComputeCompositeRegion()
According to the RENDER spec, the origin of the alpha map is
interpreted relative to the origin of the drawable of the image, not
the origin of the drawable of the alpha map.
This commit fixes that and adds an alpha-test.c test program.
The only use of alpha maps I have been able to find is in Qt and they
don't use a non-zero alpha origin.
diff --git a/render/mipict.c b/render/mipict.c
index c653ec4..e0d40ae 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -459,8 +459,8 @@ miComputeCompositeRegion (RegionPtr pRegion,
if (pSrc->alphaMap)
{
if (!miClipPictureSrc (pRegion, pSrc->alphaMap,
- xDst - (xSrc + pSrc->alphaOrigin.x),
- yDst - (ySrc + pSrc->alphaOrigin.y)))
+ xDst - (xSrc - pSrc->alphaOrigin.x),
+ yDst - (ySrc - pSrc->alphaOrigin.y)))
{
pixman_region_fini (pRegion);
return FALSE;
@@ -477,8 +477,8 @@ miComputeCompositeRegion (RegionPtr pRegion,
if (pMask->alphaMap)
{
if (!miClipPictureSrc (pRegion, pMask->alphaMap,
- xDst - (xMask + pMask->alphaOrigin.x),
- yDst - (yMask + pMask->alphaOrigin.y)))
+ xDst - (xMask - pMask->alphaOrigin.x),
+ yDst - (yMask - pMask->alphaOrigin.y)))
{
pixman_region_fini (pRegion);
return FALSE;
commit ebfd6688d1927288155221e7a78fbca9f9293952
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date: Sun May 10 23:27:56 2009 -0400
Make compositing with transformed windows work again.
The coordinate translation was broken in pretty much every way
imaginable.
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 1355e90..c89691d 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -159,22 +159,9 @@ fbComposite (CARD8 op,
{
pixman_image_t *src, *mask, *dest;
- xDst += pDst->pDrawable->x;
- yDst += pDst->pDrawable->y;
- if (pSrc->pDrawable)
- {
- xSrc += pSrc->pDrawable->x;
- ySrc += pSrc->pDrawable->y;
- }
- if (pMask && pMask->pDrawable)
- {
- xMask += pMask->pDrawable->x;
- yMask += pMask->pDrawable->y;
- }
-
- miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height);
+ miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
if (pMask)
- miCompositeSourceValidate (pMask, xMask, yMask, width, height);
+ miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
src = image_from_pict (pSrc, TRUE);
mask = image_from_pict (pMask, TRUE);
@@ -292,7 +279,8 @@ create_bits_picture (PicturePtr pict,
fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
- bits = (FbBits*)((CARD8*)bits + yoff * stride * sizeof(FbBits) + xoff * (bpp / 8));
+ bits = (FbBits*)((CARD8*)bits +
+ pict->pDrawable->y * stride * sizeof(FbBits) + pict->pDrawable->x * (bpp / 8));
image = pixman_image_create_bits (
pict->format,
@@ -321,8 +309,12 @@ create_bits_picture (PicturePtr pict,
{
if (pict->clientClipType != CT_NONE)
pixman_image_set_has_client_clip (image, TRUE);
+
+ pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
pixman_image_set_clip_region (image, pict->pCompositeClip);
+
+ pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
}
/* Indexed table */
diff --git a/render/mipict.c b/render/mipict.c
index 777f111..c653ec4 100644
--- a/render/mipict.c
+++ b/render/mipict.c
@@ -358,8 +358,6 @@ miCompositeSourceValidate (PicturePtr pPicture,
if (pScreen->SourceValidate)
{
- x -= pPicture->pDrawable->x;
- y -= pPicture->pDrawable->y;
if (pPicture->transform)
{
xPoint points[4];
@@ -394,6 +392,8 @@ miCompositeSourceValidate (PicturePtr pPicture,
width = xmax - xmin;
height = ymax - ymin;
}
+ x += pPicture->pDrawable->x;
+ y += pPicture->pDrawable->y;
(*pScreen->SourceValidate) (pDrawable, x, y, width, height);
}
}
More information about the xorg-commit
mailing list