[PATCH 5/6] exa: substitute pExaPixmap->offscreen with pExaPixmap->use_gpu_copy
Maarten Maathuis
madman2003 at gmail.com
Wed Nov 18 12:23:12 PST 2009
Signed-off-by: Maarten Maathuis <madman2003 at gmail.com>
---
exa/exa_classic.c | 8 ++++----
exa/exa_migration_classic.c | 18 +++++++++---------
exa/exa_migration_mixed.c | 6 +++---
exa/exa_mixed.c | 6 +++---
exa/exa_offscreen.c | 10 +++++-----
exa/exa_priv.h | 2 +-
6 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/exa/exa_classic.c b/exa/exa_classic.c
index 0d3fda5..fee3fde 100644
--- a/exa/exa_classic.c
+++ b/exa/exa_classic.c
@@ -38,7 +38,7 @@ ExaGetPixmapAddress(PixmapPtr p)
{
ExaPixmapPriv(p);
- if (pExaPixmap->offscreen && pExaPixmap->fb_ptr)
+ if (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr)
return pExaPixmap->fb_ptr;
else
return pExaPixmap->sys_ptr;
@@ -90,7 +90,7 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
pExaPixmap->sys_pitch = pPixmap->devKind;
pPixmap->devPrivate.ptr = NULL;
- pExaPixmap->offscreen = FALSE;
+ pExaPixmap->use_gpu_copy = FALSE;
pExaPixmap->fb_ptr = NULL;
exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
@@ -176,7 +176,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
pExaScr->info->memorySize) {
pExaPixmap->fb_ptr = pPixData;
pExaPixmap->fb_pitch = devKind;
- pExaPixmap->offscreen = TRUE;
+ pExaPixmap->use_gpu_copy = TRUE;
}
}
@@ -260,7 +260,7 @@ exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap)
ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
pPixmap->devPrivate.ptr = NULL;
} else
- ret = (pExaPixmap->offscreen && pExaPixmap->fb_ptr);
+ ret = (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr);
return ret;
}
diff --git a/exa/exa_migration_classic.c b/exa/exa_migration_classic.c
index 8e1626d..0226a2d 100644
--- a/exa/exa_migration_classic.c
+++ b/exa/exa_migration_classic.c
@@ -119,7 +119,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
Bool need_sync = FALSE;
/* Damaged bits are valid in current copy but invalid in other one */
- if (pExaPixmap->offscreen) {
+ if (pExaPixmap->use_gpu_copy) {
REGION_UNION(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB,
damage);
REGION_SUBTRACT(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
@@ -200,9 +200,9 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
pBox = REGION_RECTS(&CopyReg);
nbox = REGION_NUM_RECTS(&CopyReg);
- save_offscreen = pExaPixmap->offscreen;
+ save_offscreen = pExaPixmap->use_gpu_copy;
save_pitch = pPixmap->devKind;
- pExaPixmap->offscreen = TRUE;
+ pExaPixmap->use_gpu_copy = TRUE;
pPixmap->devKind = pExaPixmap->fb_pitch;
while (nbox--) {
@@ -242,7 +242,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
pBox++;
}
- pExaPixmap->offscreen = save_offscreen;
+ pExaPixmap->use_gpu_copy = save_offscreen;
pPixmap->devKind = save_pitch;
/* Try to prevent source valid region from growing too many rects by
@@ -361,7 +361,7 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
pPixmap->drawable.height,
exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
- pExaPixmap->offscreen = TRUE;
+ pExaPixmap->use_gpu_copy = TRUE;
pPixmap->devKind = pExaPixmap->fb_pitch;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@@ -401,7 +401,7 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate)
pPixmap->drawable.height,
exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
- pExaPixmap->offscreen = FALSE;
+ pExaPixmap->use_gpu_copy = FALSE;
pPixmap->devKind = pExaPixmap->sys_pitch;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@@ -542,9 +542,9 @@ exaAssertNotDirty (PixmapPtr pPixmap)
src_pitch = pExaPixmap->fb_pitch;
cpp = pPixmap->drawable.bitsPerPixel / 8;
- save_offscreen = pExaPixmap->offscreen;
+ save_offscreen = pExaPixmap->use_gpu_copy;
save_pitch = pPixmap->devKind;
- pExaPixmap->offscreen = TRUE;
+ pExaPixmap->use_gpu_copy = TRUE;
pPixmap->devKind = pExaPixmap->fb_pitch;
if (!ExaDoPrepareAccess(pPixmap, EXA_PREPARE_SRC))
@@ -579,7 +579,7 @@ exaAssertNotDirty (PixmapPtr pPixmap)
skip:
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
- pExaPixmap->offscreen = save_offscreen;
+ pExaPixmap->use_gpu_copy = save_offscreen;
pPixmap->devKind = save_pitch;
out:
diff --git a/exa/exa_migration_mixed.c b/exa/exa_migration_mixed.c
index 91c3196..9349ba9 100644
--- a/exa/exa_migration_mixed.c
+++ b/exa/exa_migration_mixed.c
@@ -111,7 +111,7 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
}
}
- pExaPixmap->offscreen = exaPixmapHasGpuCopy(pPixmap);
+ pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
}
}
@@ -200,7 +200,7 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
pPixmap->devKind = pExaPixmap->sys_pitch;
- pExaPixmap->offscreen = FALSE;
+ pExaPixmap->use_gpu_copy = FALSE;
} else
pPixmap->devKind = pExaPixmap->fb_pitch;
}
@@ -215,7 +215,7 @@ void exaFinishAccess_mixed(PixmapPtr pPixmap, int index)
{
ExaPixmapPriv(pPixmap);
- if (pExaPixmap->pDamage && !pExaPixmap->offscreen &&
+ if (pExaPixmap->pDamage && !pExaPixmap->use_gpu_copy &&
exaPixmapHasGpuCopy(pPixmap)){
DamageRegionProcessPending(&pPixmap->drawable);
diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c
index d2f8505..9bdac5f 100644
--- a/exa/exa_mixed.c
+++ b/exa/exa_mixed.c
@@ -93,9 +93,9 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
/* A scratch pixmap will become a driver pixmap right away. */
if (!w || !h) {
exaCreateDriverPixmap_mixed(pPixmap);
- pExaPixmap->offscreen = exaPixmapHasGpuCopy(pPixmap);
+ pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
} else
- pExaPixmap->offscreen = FALSE;
+ pExaPixmap->use_gpu_copy = FALSE;
/* During a fallback we must prepare access. */
if (pExaScr->fallback_counter)
@@ -131,7 +131,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
pExaPixmap->driverPriv = NULL;
}
- pExaPixmap->offscreen = FALSE;
+ pExaPixmap->use_gpu_copy = FALSE;
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
}
diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index eb53b2a..f8a2f39 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -522,7 +522,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
return NULL;
pExaDstPix = ExaGetPixmapPriv (pDstPix);
- pExaDstPix->offscreen = TRUE;
+ pExaDstPix->use_gpu_copy = TRUE;
for (area = pExaScr->info->offScreenAreas->prev;
area != pExaScr->info->offScreenAreas;
@@ -576,10 +576,10 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
continue;
}
- save_offscreen = pExaSrcPix->offscreen;
+ save_offscreen = pExaSrcPix->use_gpu_copy;
save_pitch = pSrcPix->devKind;
- pExaSrcPix->offscreen = TRUE;
+ pExaSrcPix->use_gpu_copy = TRUE;
pSrcPix->devKind = pExaSrcPix->fb_pitch;
pDstPix->drawable.width = pSrcPix->drawable.width;
@@ -589,7 +589,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
pDstPix->drawable.bitsPerPixel = pSrcPix->drawable.bitsPerPixel;
if (!pExaScr->info->PrepareCopy (pSrcPix, pDstPix, -1, -1, GXcopy, ~0)) {
- pExaSrcPix->offscreen = save_offscreen;
+ pExaSrcPix->use_gpu_copy = save_offscreen;
pSrcPix->devKind = save_pitch;
area = prev;
continue;
@@ -646,7 +646,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
#endif
pExaSrcPix->fb_ptr = pExaDstPix->fb_ptr;
- pExaSrcPix->offscreen = save_offscreen;
+ pExaSrcPix->use_gpu_copy = save_offscreen;
pSrcPix->devKind = save_pitch;
}
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 1ee2b9c..69c0d24 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -283,7 +283,7 @@ extern DevPrivateKey exaGCPrivateKey;
typedef struct {
ExaOffscreenArea *area;
int score; /**< score for the move-in vs move-out heuristic */
- Bool offscreen;
+ Bool use_gpu_copy;
CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */
int sys_pitch; /**< pitch of pixmap in system memory */
--
1.6.5.2
More information about the xorg-devel
mailing list