diff options
author | Francisco Jerez <currojerez@gmail.com> | 2008-12-21 16:58:29 +0100 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-21 18:50:59 -0200 |
commit | 75b1c309f1418d70e8cf112744ff95f372d4ef75 (patch) | |
tree | 572c0a65acc644b4f1924f45f39fc4ffff074510 /src | |
parent | 068de9c0a302aba21e4d6a27eb6d330375ff2d2f (diff) |
Fix SMI_CrtcShadowAllocate.
Diffstat (limited to 'src')
-rw-r--r-- | src/smi_crtc.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/smi_crtc.c b/src/smi_crtc.c index 080473e..5bcc471 100644 --- a/src/smi_crtc.c +++ b/src/smi_crtc.c @@ -115,22 +115,16 @@ SMI_CrtcShadowAllocate (xf86CrtcPtr crtc, int width, int height) SMIPtr pSmi = SMIPTR(pScrn); SMICrtcPrivatePtr crtcPriv = SMICRTC(crtc); int offset, size; - unsigned char *result = NULL; ENTER(); - size = (pSmi->useEXA ? ((width * pSmi->Bpp + 15) & ~15) : width) * height; + size = ((width * pSmi->Bpp + 15) & ~15) * height; offset = SMI_AllocateMemory(pScrn, &crtcPriv->shadowArea, size); - if (offset) { - result = pSmi->FBBase; - if (pSmi->useEXA) - result += ((ExaOffscreenArea *)crtcPriv->shadowArea)->offset; - else - result += offset * pSmi->Bpp; - } + if (!crtcPriv->shadowArea) + LEAVE(NULL); - LEAVE(result); + LEAVE(pSmi->FBBase + offset); } static PixmapPtr |