xf86-video-intel: src/i810_dri.c src/i830_dri.c
Zhenyu Wang
zhen at kemper.freedesktop.org
Tue Nov 27 22:16:36 PST 2007
src/i810_dri.c | 28 ++++++++++++++--------------
src/i830_dri.c | 28 ++++++++++++++--------------
2 files changed, 28 insertions(+), 28 deletions(-)
New commits:
commit 75ef3e669dac1259d282dcc8f54b197fc19f22b3
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date: Wed Nov 28 22:13:55 2007 +0800
Replace ALLOCATE_LOCAL/DEALLOCATE_LOCAL with xalloc/xfree
diff --git a/src/i810_dri.c b/src/i810_dri.c
index e5e1565..136a705 100644
--- a/src/i810_dri.c
+++ b/src/i810_dri.c
@@ -1208,7 +1208,7 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I810Ptr pI810 = I810PTR(pScrn);
BoxPtr pboxTmp, pboxNext, pboxBase;
- DDXPointPtr pptTmp, pptNew2;
+ DDXPointPtr pptTmp, pptNew2 = NULL;
int xdir, ydir;
int screenwidth = pScrn->virtualX;
@@ -1231,12 +1231,12 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
if (nbox > 1) {
/* Keep ordering in each band, reverse order of bands */
- pboxNew1 = (BoxPtr) ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
+ pboxNew1 = (BoxPtr) xalloc(sizeof(BoxRec) * nbox);
if (!pboxNew1)
return;
- pptNew1 = (DDXPointPtr) ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pptNew1 = (DDXPointPtr) xalloc(sizeof(DDXPointRec) * nbox);
if (!pptNew1) {
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pboxNew1);
return;
}
pboxBase = pboxNext = pbox + nbox - 1;
@@ -1267,16 +1267,16 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
if (nbox > 1) {
/*reverse orderof rects in each band */
- pboxNew2 = (BoxPtr) ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
- pptNew2 = (DDXPointPtr) ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pboxNew2 = (BoxPtr) xalloc(sizeof(BoxRec) * nbox);
+ pptNew2 = (DDXPointPtr) xalloc(sizeof(DDXPointRec) * nbox);
if (!pboxNew2 || !pptNew2) {
if (pptNew2)
- DEALLOCATE_LOCAL(pptNew2);
+ xfree(pptNew2);
if (pboxNew2)
- DEALLOCATE_LOCAL(pboxNew2);
+ xfree(pboxNew2);
if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
return;
}
@@ -1341,12 +1341,12 @@ I810DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
I810EmitFlush(pScrn);
if (pboxNew2) {
- DEALLOCATE_LOCAL(pptNew2);
- DEALLOCATE_LOCAL(pboxNew2);
+ xfree(pptNew2);
+ xfree(pboxNew2);
}
if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
if (pI810->AccelInfoRec)
diff --git a/src/i830_dri.c b/src/i830_dri.c
index b223b02..f52a7c3 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1249,7 +1249,7 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I830Ptr pI830 = I830PTR(pScrn);
BoxPtr pboxTmp, pboxNext, pboxBase;
- DDXPointPtr pptTmp, pptNew2;
+ DDXPointPtr pptTmp, pptNew2 = NULL;
int xdir, ydir;
#if 0
@@ -1277,12 +1277,12 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
if (nbox > 1) {
/* Keep ordering in each band, reverse order of bands */
- pboxNew1 = (BoxPtr) ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
+ pboxNew1 = (BoxPtr) xalloc(sizeof(BoxRec) * nbox);
if (!pboxNew1)
return;
- pptNew1 = (DDXPointPtr) ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pptNew1 = (DDXPointPtr) xalloc(sizeof(DDXPointRec) * nbox);
if (!pptNew1) {
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pboxNew1);
return;
}
pboxBase = pboxNext = pbox + nbox - 1;
@@ -1313,16 +1313,16 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
if (nbox > 1) {
/*reverse orderof rects in each band */
- pboxNew2 = (BoxPtr) ALLOCATE_LOCAL(sizeof(BoxRec) * nbox);
- pptNew2 = (DDXPointPtr) ALLOCATE_LOCAL(sizeof(DDXPointRec) * nbox);
+ pboxNew2 = (BoxPtr) xalloc(sizeof(BoxRec) * nbox);
+ pptNew2 = (DDXPointPtr) xalloc(sizeof(DDXPointRec) * nbox);
if (!pboxNew2 || !pptNew2) {
if (pptNew2)
- DEALLOCATE_LOCAL(pptNew2);
+ xfree(pptNew2);
if (pboxNew2)
- DEALLOCATE_LOCAL(pboxNew2);
+ xfree(pboxNew2);
if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
return;
}
@@ -1393,12 +1393,12 @@ I830DRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
I830EmitFlush(pScrn);
if (pboxNew2) {
- DEALLOCATE_LOCAL(pptNew2);
- DEALLOCATE_LOCAL(pboxNew2);
+ xfree(pptNew2);
+ xfree(pboxNew2);
}
if (pboxNew1) {
- DEALLOCATE_LOCAL(pptNew1);
- DEALLOCATE_LOCAL(pboxNew1);
+ xfree(pptNew1);
+ xfree(pboxNew1);
}
i830MarkSync(pScrn);
}
More information about the xorg-commit
mailing list