summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2008-07-24 10:47:57 -0600
committerJordan Crouse <jordan.crouse@amd.com>2008-08-07 14:22:18 -0600
commitf89f6d8004a0ae0ae7826f72a1058d26e9e0217a (patch)
treebdde367b5a6bfd01968e914cc5f4f2c9095a1d57
parente98927f2c60acd9262cfb6fca2491fe0decc7aa5 (diff)
lx: Fix rotate issue
EXA pixmaps are now protected against outside intrusion, so use a different way to find the base of the shadow buffer for rotation.
-rw-r--r--src/lx_rotate.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lx_rotate.c b/src/lx_rotate.c
index eee58c7..bc29f26 100644
--- a/src/lx_rotate.c
+++ b/src/lx_rotate.c
@@ -71,6 +71,12 @@ LXUpdateFunc(ScreenPtr pScreen, shadowBufPtr pBuf)
ScrnInfoPtr pScrni = xf86Screens[pScreen->myNum];
GeodeRec *pGeode = GEODEPTR(pScrni);
+ /* shaBits isn't reliable here, because we are outside of
+ * the EXA access boundaries - we'll just use the offset from
+ * the pixmap and hope for the best - we stil use fbGetDrawable
+ * for the other variables
+ */
+
fbGetDrawable(&pShadow->drawable, shaBits, shaStride, shaBpp, shaXoff,
shaYoff);
@@ -105,8 +111,7 @@ LXUpdateFunc(ScreenPtr pScreen, shadowBufPtr pBuf)
w = (pbox->x2 - pbox->x1);
h = pbox->y2 - pbox->y1;
- srcOffset =
- ((unsigned long)shaBits) - ((unsigned long)pGeode->FBBase);
+ srcOffset = pGeode->shadowArea->offset;
srcOffset += (y * pGeode->Pitch) + (x * (shaBpp >> 3));
switch (pGeode->rotation) {