exa: s/PixmapIsOffscreen/PixmapHasGpuCopy and s/pExaPixmap->offscreen/pExaPixmap->use_gpu_copy

- Fixup some variable names as well.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Maarten Maathuis 2009-11-28 10:34:44 +01:00 committed by Keith Packard
parent 342f3689d1
commit a54c23fe64
12 changed files with 96 additions and 94 deletions

View File

@ -233,19 +233,19 @@ exaPixmapIsPinned (PixmapPtr pPix)
} }
/** /**
* exaPixmapIsOffscreen() is used to determine if a pixmap is in offscreen * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen
* memory, meaning that acceleration could probably be done to it, and that it * memory, meaning that acceleration could probably be done to it, and that it
* will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it
* with the CPU. * with the CPU.
* *
* Note that except for UploadToScreen()/DownloadFromScreen() (which explicitly * Note that except for UploadToScreen()/DownloadFromScreen() (which explicitly
* deal with moving pixmaps in and out of system memory), EXA will give drivers * deal with moving pixmaps in and out of system memory), EXA will give drivers
* pixmaps as arguments for which exaPixmapIsOffscreen() is TRUE. * pixmaps as arguments for which exaPixmapHasGpuCopy() is TRUE.
* *
* @return TRUE if the given drawable is in framebuffer memory. * @return TRUE if the given drawable is in framebuffer memory.
*/ */
Bool Bool
exaPixmapIsOffscreen(PixmapPtr pPixmap) exaPixmapHasGpuCopy(PixmapPtr pPixmap)
{ {
ScreenPtr pScreen = pPixmap->drawable.pScreen; ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv(pScreen); ExaScreenPriv(pScreen);
@ -253,16 +253,16 @@ exaPixmapIsOffscreen(PixmapPtr pPixmap)
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
return FALSE; return FALSE;
return (*pExaScr->pixmap_is_offscreen)(pPixmap); return (*pExaScr->pixmap_has_gpu_copy)(pPixmap);
} }
/** /**
* exaDrawableIsOffscreen() is a convenience wrapper for exaPixmapIsOffscreen(). * exaDrawableIsOffscreen() is a convenience wrapper for exaPixmapHasGpuCopy().
*/ */
Bool Bool
exaDrawableIsOffscreen (DrawablePtr pDrawable) exaDrawableIsOffscreen (DrawablePtr pDrawable)
{ {
return exaPixmapIsOffscreen (exaGetDrawablePixmap (pDrawable)); return exaPixmapHasGpuCopy (exaGetDrawablePixmap (pDrawable));
} }
/** /**
@ -276,7 +276,7 @@ exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp)
exaGetDrawableDeltas (pDrawable, pPixmap, xp, yp); exaGetDrawableDeltas (pDrawable, pPixmap, xp, yp);
if (exaPixmapIsOffscreen (pPixmap)) if (exaPixmapHasGpuCopy (pPixmap))
return pPixmap; return pPixmap;
else else
return NULL; return NULL;
@ -291,7 +291,7 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
ScreenPtr pScreen = pPixmap->drawable.pScreen; ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv (pScreen); ExaScreenPriv (pScreen);
ExaPixmapPriv(pPixmap); ExaPixmapPriv(pPixmap);
Bool offscreen; Bool has_gpu_copy;
int i; int i;
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
@ -321,9 +321,9 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
pPixmap->devPrivate.ptr)); pPixmap->devPrivate.ptr));
} }
offscreen = exaPixmapIsOffscreen(pPixmap); has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
if (offscreen && pExaPixmap->fb_ptr) if (has_gpu_copy && pExaPixmap->fb_ptr)
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
else else
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
@ -332,7 +332,7 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
pExaScr->access[index].pixmap = pPixmap; pExaScr->access[index].pixmap = pPixmap;
pExaScr->access[index].count = 1; pExaScr->access[index].count = 1;
if (!offscreen) if (!has_gpu_copy)
return FALSE; return FALSE;
exaWaitSync (pScreen); exaWaitSync (pScreen);
@ -420,7 +420,7 @@ exaFinishAccess(DrawablePtr pDrawable, int index)
if (pExaScr->finish_access) if (pExaScr->finish_access)
pExaScr->finish_access(pPixmap, index); pExaScr->finish_access(pPixmap, index);
if (!pExaScr->info->FinishAccess || !exaPixmapIsOffscreen(pPixmap)) if (!pExaScr->info->FinishAccess || !exaPixmapHasGpuCopy(pPixmap))
return; return;
if (i >= EXA_PREPARE_AUX_DEST && if (i >= EXA_PREPARE_AUX_DEST &&
@ -969,7 +969,7 @@ exaDriverInit (ScreenPtr pScreen,
wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_mixed); wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_mixed);
wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_mixed); wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_mixed);
pExaScr->do_migration = exaDoMigration_mixed; pExaScr->do_migration = exaDoMigration_mixed;
pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_mixed; pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_mixed;
pExaScr->do_move_in_pixmap = exaMoveInPixmap_mixed; pExaScr->do_move_in_pixmap = exaMoveInPixmap_mixed;
pExaScr->do_move_out_pixmap = NULL; pExaScr->do_move_out_pixmap = NULL;
pExaScr->prepare_access_reg = exaPrepareAccessReg_mixed; pExaScr->prepare_access_reg = exaPrepareAccessReg_mixed;
@ -979,7 +979,7 @@ exaDriverInit (ScreenPtr pScreen,
wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_driver); wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_driver);
wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_driver); wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_driver);
pExaScr->do_migration = NULL; pExaScr->do_migration = NULL;
pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_driver; pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_driver;
pExaScr->do_move_in_pixmap = NULL; pExaScr->do_move_in_pixmap = NULL;
pExaScr->do_move_out_pixmap = NULL; pExaScr->do_move_out_pixmap = NULL;
pExaScr->prepare_access_reg = NULL; pExaScr->prepare_access_reg = NULL;
@ -990,7 +990,7 @@ exaDriverInit (ScreenPtr pScreen,
wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_classic); wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_classic);
wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_classic); wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_classic);
pExaScr->do_migration = exaDoMigration_classic; pExaScr->do_migration = exaDoMigration_classic;
pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_classic; pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_classic;
pExaScr->do_move_in_pixmap = exaMoveInPixmap_classic; pExaScr->do_move_in_pixmap = exaMoveInPixmap_classic;
pExaScr->do_move_out_pixmap = exaMoveOutPixmap_classic; pExaScr->do_move_out_pixmap = exaMoveOutPixmap_classic;
pExaScr->prepare_access_reg = exaPrepareAccessReg_classic; pExaScr->prepare_access_reg = exaPrepareAccessReg_classic;

View File

@ -624,13 +624,13 @@ typedef struct _ExaDriver {
/** /**
* PixmapIsOffscreen() is an optional driver replacement to * PixmapIsOffscreen() is an optional driver replacement to
* exaPixmapIsOffscreen(). Set to NULL if you want the standard behaviour * exaPixmapHasGpuCopy(). Set to NULL if you want the standard behaviour
* of exaPixmapIsOffscreen(). * of exaPixmapHasGpuCopy().
* *
* @param pPix the pixmap * @param pPix the pixmap
* @return TRUE if the given drawable is in framebuffer memory. * @return TRUE if the given drawable is in framebuffer memory.
* *
* exaPixmapIsOffscreen() is used to determine if a pixmap is in offscreen * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen
* memory, meaning that acceleration could probably be done to it, and that it * memory, meaning that acceleration could probably be done to it, and that it
* will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it
* with the CPU. * with the CPU.

View File

@ -482,9 +482,9 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable,
goto fallback; goto fallback;
} }
if (exaPixmapIsOffscreen(pDstPixmap)) { if (exaPixmapHasGpuCopy(pDstPixmap)) {
/* Normal blitting. */ /* Normal blitting. */
if (exaPixmapIsOffscreen(pSrcPixmap)) { if (exaPixmapHasGpuCopy(pSrcPixmap)) {
if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1, if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1,
upsidedown ? -1 : 1, upsidedown ? -1 : 1,
pGC ? pGC->alu : GXcopy, pGC ? pGC->alu : GXcopy,
@ -840,7 +840,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
exaDoMigration (pixmaps, 1, TRUE); exaDoMigration (pixmaps, 1, TRUE);
} }
if (!exaPixmapIsOffscreen (pPixmap) || if (!exaPixmapHasGpuCopy (pPixmap) ||
!(*pExaScr->info->PrepareSolid) (pPixmap, !(*pExaScr->info->PrepareSolid) (pPixmap,
pGC->alu, pGC->alu,
pGC->planemask, pGC->planemask,
@ -1022,7 +1022,7 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
exaDoMigration (pixmaps, 1, TRUE); exaDoMigration (pixmaps, 1, TRUE);
} }
if (exaPixmapIsOffscreen (pPixmap) && if (exaPixmapHasGpuCopy (pPixmap) &&
(*pExaScr->info->PrepareSolid) (pPixmap, alu, planemask, pixel)) (*pExaScr->info->PrepareSolid) (pPixmap, alu, planemask, pixel))
{ {
int nbox; int nbox;
@ -1125,7 +1125,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
if (!pPixmap || !exaPixmapIsOffscreen(pTile)) if (!pPixmap || !exaPixmapHasGpuCopy(pTile))
return FALSE; return FALSE;
if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask)) if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask))

View File

@ -38,7 +38,7 @@ ExaGetPixmapAddress(PixmapPtr p)
{ {
ExaPixmapPriv(p); ExaPixmapPriv(p);
if (pExaPixmap->offscreen && pExaPixmap->fb_ptr) if (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr)
return pExaPixmap->fb_ptr; return pExaPixmap->fb_ptr;
else else
return pExaPixmap->sys_ptr; return pExaPixmap->sys_ptr;
@ -90,7 +90,7 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth,
pExaPixmap->sys_pitch = pPixmap->devKind; pExaPixmap->sys_pitch = pPixmap->devKind;
pPixmap->devPrivate.ptr = NULL; pPixmap->devPrivate.ptr = NULL;
pExaPixmap->offscreen = FALSE; pExaPixmap->use_gpu_copy = FALSE;
pExaPixmap->fb_ptr = NULL; pExaPixmap->fb_ptr = NULL;
exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp);
@ -168,7 +168,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
/* Classic EXA: /* Classic EXA:
* - Framebuffer. * - Framebuffer.
* - Scratch pixmap with offscreen memory. * - Scratch pixmap with gpu memory.
*/ */
if (pExaScr->info->memoryBase && pPixData) { if (pExaScr->info->memoryBase && pPixData) {
if ((CARD8 *)pPixData >= pExaScr->info->memoryBase && if ((CARD8 *)pPixData >= pExaScr->info->memoryBase &&
@ -176,7 +176,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
pExaScr->info->memorySize) { pExaScr->info->memorySize) {
pExaPixmap->fb_ptr = pPixData; pExaPixmap->fb_ptr = pPixData;
pExaPixmap->fb_pitch = devKind; pExaPixmap->fb_pitch = devKind;
pExaPixmap->offscreen = TRUE; pExaPixmap->use_gpu_copy = TRUE;
} }
} }
@ -189,7 +189,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept
} }
/* Pixmaps subject to ModifyPixmapHeader will be pinned to system or /* Pixmaps subject to ModifyPixmapHeader will be pinned to system or
* offscreen memory, so there's no need to track damage. * gpu memory, so there's no need to track damage.
*/ */
if (pExaPixmap->pDamage) { if (pExaPixmap->pDamage) {
DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage); DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
@ -248,7 +248,7 @@ exaDestroyPixmap_classic (PixmapPtr pPixmap)
} }
Bool Bool
exaPixmapIsOffscreen_classic(PixmapPtr pPixmap) exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap)
{ {
ScreenPtr pScreen = pPixmap->drawable.pScreen; ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv(pScreen); ExaScreenPriv(pScreen);
@ -260,7 +260,7 @@ exaPixmapIsOffscreen_classic(PixmapPtr pPixmap)
ret = pExaScr->info->PixmapIsOffscreen(pPixmap); ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
pPixmap->devPrivate.ptr = NULL; pPixmap->devPrivate.ptr = NULL;
} else } else
ret = (pExaPixmap->offscreen && pExaPixmap->fb_ptr); ret = (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr);
return ret; return ret;
} }

View File

@ -71,8 +71,8 @@ exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth,
bpp = pPixmap->drawable.bitsPerPixel; bpp = pPixmap->drawable.bitsPerPixel;
/* Set this before driver hooks, to allow for !offscreen pixmaps. /* Set this before driver hooks, to allow for driver pixmaps without gpu
* !offscreen pixmaps have a valid pointer at all times. * memory to back it. These pixmaps have a valid pointer at all times.
*/ */
pPixmap->devPrivate.ptr = NULL; pPixmap->devPrivate.ptr = NULL;
@ -157,8 +157,9 @@ exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth
ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth, ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth,
bitsPerPixel, devKind, pPixData); bitsPerPixel, devKind, pPixData);
/* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL. /* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL.
* If pPixmap->devPrivate.ptr is non-NULL, then we've got a non-offscreen pixmap. * If pPixmap->devPrivate.ptr is non-NULL, then we've got a
* We need to store the pointer, because PrepareAccess won't be called. * !has_gpu_copy pixmap. We need to store the pointer,
* because PrepareAccess won't be called.
*/ */
if (!pPixData && pPixmap->devPrivate.ptr && pPixmap->devKind) { if (!pPixData && pPixmap->devPrivate.ptr && pPixmap->devKind) {
pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
@ -208,7 +209,7 @@ exaDestroyPixmap_driver (PixmapPtr pPixmap)
} }
Bool Bool
exaPixmapIsOffscreen_driver(PixmapPtr pPixmap) exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap)
{ {
ScreenPtr pScreen = pPixmap->drawable.pScreen; ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv(pScreen); ExaScreenPriv(pScreen);

View File

@ -347,11 +347,11 @@ exaGlyphCacheHashRemove(ExaGlyphCachePtr cache,
/* The most efficient thing to way to upload the glyph to the screen /* The most efficient thing to way to upload the glyph to the screen
* is to use the UploadToScreen() driver hook; this allows us to * is to use the UploadToScreen() driver hook; this allows us to
* pipeline glyph uploads and to avoid creating offscreen pixmaps for * pipeline glyph uploads and to avoid creating gpu backed pixmaps for
* glyphs that we'll never use again. * glyphs that we'll never use again.
* *
* If we can't do it with UploadToScreen (because the glyph is offscreen, etc), * If we can't do it with UploadToScreen (because the glyph has a gpu copy,
* we fall back to CompositePicture. * etc), we fall back to CompositePicture.
* *
* We need to damage the cache pixmap manually in either case because the damage * We need to damage the cache pixmap manually in either case because the damage
* layer unwrapped the picture screen before calling exaGlyphs. * layer unwrapped the picture screen before calling exaGlyphs.
@ -374,7 +374,7 @@ exaGlyphCacheUploadGlyph(ScreenPtr pScreen,
/* If the glyph pixmap is already uploaded, no point in doing /* If the glyph pixmap is already uploaded, no point in doing
* things this way */ * things this way */
if (exaPixmapIsOffscreen(pGlyphPixmap)) if (exaPixmapHasGpuCopy(pGlyphPixmap))
goto composite; goto composite;
/* UploadToScreen only works if bpp match */ /* UploadToScreen only works if bpp match */
@ -384,7 +384,7 @@ exaGlyphCacheUploadGlyph(ScreenPtr pScreen,
if (pExaScr->do_migration) { if (pExaScr->do_migration) {
ExaMigrationRec pixmaps[1]; ExaMigrationRec pixmaps[1];
/* cache pixmap must be offscreen. */ /* cache pixmap must have a gpu copy. */
pixmaps[0].as_dst = TRUE; pixmaps[0].as_dst = TRUE;
pixmaps[0].as_src = FALSE; pixmaps[0].as_src = FALSE;
pixmaps[0].pPix = pCachePixmap; pixmaps[0].pPix = pCachePixmap;
@ -392,7 +392,7 @@ exaGlyphCacheUploadGlyph(ScreenPtr pScreen,
exaDoMigration (pixmaps, 1, TRUE); exaDoMigration (pixmaps, 1, TRUE);
} }
if (!exaPixmapIsOffscreen(pCachePixmap)) if (!exaPixmapHasGpuCopy(pCachePixmap))
goto composite; goto composite;
/* x,y are in pixmap coordinates, no need for cache{X,Y}off */ /* x,y are in pixmap coordinates, no need for cache{X,Y}off */

View File

@ -111,7 +111,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
ExaPixmapPriv (pPixmap); ExaPixmapPriv (pPixmap);
RegionPtr damage = DamageRegion (pExaPixmap->pDamage); RegionPtr damage = DamageRegion (pExaPixmap->pDamage);
RegionRec CopyReg; RegionRec CopyReg;
Bool save_offscreen; Bool save_use_gpu_copy;
int save_pitch; int save_pitch;
BoxPtr pBox; BoxPtr pBox;
int nbox; int nbox;
@ -119,7 +119,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
Bool need_sync = FALSE; Bool need_sync = FALSE;
/* Damaged bits are valid in current copy but invalid in other one */ /* 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, REGION_UNION(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB,
damage); damage);
REGION_SUBTRACT(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys, REGION_SUBTRACT(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys,
@ -200,9 +200,9 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
pBox = REGION_RECTS(&CopyReg); pBox = REGION_RECTS(&CopyReg);
nbox = REGION_NUM_RECTS(&CopyReg); nbox = REGION_NUM_RECTS(&CopyReg);
save_offscreen = pExaPixmap->offscreen; save_use_gpu_copy = pExaPixmap->use_gpu_copy;
save_pitch = pPixmap->devKind; save_pitch = pPixmap->devKind;
pExaPixmap->offscreen = TRUE; pExaPixmap->use_gpu_copy = TRUE;
pPixmap->devKind = pExaPixmap->fb_pitch; pPixmap->devKind = pExaPixmap->fb_pitch;
while (nbox--) { while (nbox--) {
@ -242,7 +242,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
pBox++; pBox++;
} }
pExaPixmap->offscreen = save_offscreen; pExaPixmap->use_gpu_copy = save_use_gpu_copy;
pPixmap->devKind = save_pitch; pPixmap->devKind = save_pitch;
/* Try to prevent source valid region from growing too many rects by /* Try to prevent source valid region from growing too many rects by
@ -351,7 +351,7 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
exaCopyDirtyToFb (migrate); exaCopyDirtyToFb (migrate);
if (exaPixmapIsOffscreen(pPixmap)) if (exaPixmapHasGpuCopy(pPixmap))
return; return;
DBG_MIGRATE (("-> %p (0x%x) (%dx%d) (%c)\n", pPixmap, DBG_MIGRATE (("-> %p (0x%x) (%dx%d) (%c)\n", pPixmap,
@ -361,7 +361,7 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
pPixmap->drawable.height, pPixmap->drawable.height,
exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
pExaPixmap->offscreen = TRUE; pExaPixmap->use_gpu_copy = TRUE;
pPixmap->devKind = pExaPixmap->fb_pitch; pPixmap->devKind = pExaPixmap->fb_pitch;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@ -392,7 +392,7 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate)
exaCopyDirtyToSys (migrate); exaCopyDirtyToSys (migrate);
if (exaPixmapIsOffscreen(pPixmap)) { if (exaPixmapHasGpuCopy(pPixmap)) {
DBG_MIGRATE (("<- %p (%p) (%dx%d) (%c)\n", pPixmap, DBG_MIGRATE (("<- %p (%p) (%dx%d) (%c)\n", pPixmap,
(void*)(ExaGetPixmapPriv(pPixmap)->area ? (void*)(ExaGetPixmapPriv(pPixmap)->area ?
@ -401,7 +401,7 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate)
pPixmap->drawable.height, pPixmap->drawable.height,
exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
pExaPixmap->offscreen = FALSE; pExaPixmap->use_gpu_copy = FALSE;
pPixmap->devKind = pExaPixmap->sys_pitch; pPixmap->devKind = pExaPixmap->sys_pitch;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@ -468,12 +468,12 @@ exaMigrateTowardFb (ExaMigrationPtr migrate)
pExaPixmap->score++; pExaPixmap->score++;
if (pExaPixmap->score >= EXA_PIXMAP_SCORE_MOVE_IN && if (pExaPixmap->score >= EXA_PIXMAP_SCORE_MOVE_IN &&
!exaPixmapIsOffscreen(pPixmap)) !exaPixmapHasGpuCopy(pPixmap))
{ {
exaDoMoveInPixmap(migrate); exaDoMoveInPixmap(migrate);
} }
if (exaPixmapIsOffscreen(pPixmap)) { if (exaPixmapHasGpuCopy(pPixmap)) {
exaCopyDirtyToFb (migrate); exaCopyDirtyToFb (migrate);
ExaOffscreenMarkUsed (pPixmap); ExaOffscreenMarkUsed (pPixmap);
} else } else
@ -504,7 +504,7 @@ exaMigrateTowardSys (ExaMigrationPtr migrate)
if (pExaPixmap->score <= EXA_PIXMAP_SCORE_MOVE_OUT && pExaPixmap->area) if (pExaPixmap->score <= EXA_PIXMAP_SCORE_MOVE_OUT && pExaPixmap->area)
exaDoMoveOutPixmap(migrate); exaDoMoveOutPixmap(migrate);
if (exaPixmapIsOffscreen(pPixmap)) { if (exaPixmapHasGpuCopy(pPixmap)) {
exaCopyDirtyToFb (migrate); exaCopyDirtyToFb (migrate);
ExaOffscreenMarkUsed (pPixmap); ExaOffscreenMarkUsed (pPixmap);
} else } else
@ -523,7 +523,7 @@ exaAssertNotDirty (PixmapPtr pPixmap)
RegionRec ValidReg; RegionRec ValidReg;
int dst_pitch, src_pitch, cpp, y, nbox, save_pitch; int dst_pitch, src_pitch, cpp, y, nbox, save_pitch;
BoxPtr pBox; BoxPtr pBox;
Bool ret = TRUE, save_offscreen; Bool ret = TRUE, save_use_gpu_copy;
if (exaPixmapIsPinned(pPixmap) || pExaPixmap->area == NULL) if (exaPixmapIsPinned(pPixmap) || pExaPixmap->area == NULL)
return ret; return ret;
@ -542,9 +542,9 @@ exaAssertNotDirty (PixmapPtr pPixmap)
src_pitch = pExaPixmap->fb_pitch; src_pitch = pExaPixmap->fb_pitch;
cpp = pPixmap->drawable.bitsPerPixel / 8; cpp = pPixmap->drawable.bitsPerPixel / 8;
save_offscreen = pExaPixmap->offscreen; save_use_gpu_copy = pExaPixmap->use_gpu_copy;
save_pitch = pPixmap->devKind; save_pitch = pPixmap->devKind;
pExaPixmap->offscreen = TRUE; pExaPixmap->use_gpu_copy = TRUE;
pPixmap->devKind = pExaPixmap->fb_pitch; pPixmap->devKind = pExaPixmap->fb_pitch;
if (!ExaDoPrepareAccess(pPixmap, EXA_PREPARE_SRC)) if (!ExaDoPrepareAccess(pPixmap, EXA_PREPARE_SRC))
@ -579,7 +579,7 @@ exaAssertNotDirty (PixmapPtr pPixmap)
skip: skip:
exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC); exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC);
pExaPixmap->offscreen = save_offscreen; pExaPixmap->use_gpu_copy = save_use_gpu_copy;
pPixmap->devKind = save_pitch; pPixmap->devKind = save_pitch;
out: out:
@ -618,7 +618,7 @@ exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
*/ */
for (i = 0; i < npixmaps; i++) { for (i = 0; i < npixmaps; i++) {
if (exaPixmapIsPinned (pixmaps[i].pPix) && if (exaPixmapIsPinned (pixmaps[i].pPix) &&
!exaPixmapIsOffscreen (pixmaps[i].pPix)) !exaPixmapHasGpuCopy (pixmaps[i].pPix))
{ {
EXA_FALLBACK(("Pixmap %p (%dx%d) pinned in sys\n", pixmaps[i].pPix, EXA_FALLBACK(("Pixmap %p (%dx%d) pinned in sys\n", pixmaps[i].pPix,
pixmaps[i].pPix->drawable.width, pixmaps[i].pPix->drawable.width,
@ -680,7 +680,7 @@ exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
} }
for (i = 0; i < npixmaps; i++) { for (i = 0; i < npixmaps; i++) {
if (exaPixmapIsOffscreen(pixmaps[i].pPix)) { if (exaPixmapHasGpuCopy(pixmaps[i].pPix)) {
/* Found one in FB, so move all to FB. */ /* Found one in FB, so move all to FB. */
for (j = 0; j < npixmaps; j++) for (j = 0; j < npixmaps; j++)
exaMigrateTowardFb(pixmaps + i); exaMigrateTowardFb(pixmaps + i);
@ -709,12 +709,12 @@ exaDoMigration_classic (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
/* If we couldn't fit everything in, abort */ /* If we couldn't fit everything in, abort */
for (i = 0; i < npixmaps; i++) { for (i = 0; i < npixmaps; i++) {
if (!exaPixmapIsOffscreen(pixmaps[i].pPix)) { if (!exaPixmapHasGpuCopy(pixmaps[i].pPix)) {
return; return;
} }
} }
/* Yay, everything's offscreen, mark memory as used */ /* Yay, everything has a gpu copy, mark memory as used */
for (i = 0; i < npixmaps; i++) { for (i = 0; i < npixmaps; i++) {
ExaOffscreenMarkUsed (pixmaps[i].pPix); ExaOffscreenMarkUsed (pixmaps[i].pPix);
} }

View File

@ -80,7 +80,7 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
*/ */
for (i = 0; i < npixmaps; i++) { for (i = 0; i < npixmaps; i++) {
if (exaPixmapIsPinned (pixmaps[i].pPix) && if (exaPixmapIsPinned (pixmaps[i].pPix) &&
!exaPixmapIsOffscreen (pixmaps[i].pPix)) !exaPixmapHasGpuCopy (pixmaps[i].pPix))
{ {
can_accel = FALSE; can_accel = FALSE;
break; break;
@ -98,7 +98,7 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
if (!pExaPixmap->driverPriv) if (!pExaPixmap->driverPriv)
exaCreateDriverPixmap_mixed(pPixmap); exaCreateDriverPixmap_mixed(pPixmap);
if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap)) { if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) {
ExaScreenPriv(pPixmap->drawable.pScreen); ExaScreenPriv(pPixmap->drawable.pScreen);
pPixmap->devKind = pExaPixmap->fb_pitch; pPixmap->devKind = pExaPixmap->fb_pitch;
@ -108,7 +108,7 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
pExaScr->deferred_mixed_pixmap = NULL; pExaScr->deferred_mixed_pixmap = NULL;
} }
pExaPixmap->offscreen = exaPixmapIsOffscreen(pPixmap); pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
} }
} }
@ -135,7 +135,7 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
{ {
if (!ExaDoPrepareAccess(pPixmap, index)) { if (!ExaDoPrepareAccess(pPixmap, index)) {
ExaPixmapPriv(pPixmap); ExaPixmapPriv(pPixmap);
Bool is_offscreen = exaPixmapIsOffscreen(pPixmap); Bool has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
ExaMigrationRec pixmaps[1]; ExaMigrationRec pixmaps[1];
/* Do we need to allocate our system buffer? */ /* Do we need to allocate our system buffer? */
@ -157,7 +157,8 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
pixmaps[0].pPix = pPixmap; pixmaps[0].pPix = pPixmap;
pixmaps[0].pReg = pReg; pixmaps[0].pReg = pReg;
if (!pExaPixmap->pDamage && (is_offscreen || !exaPixmapIsPinned(pPixmap))) { if (!pExaPixmap->pDamage &&
(has_gpu_copy || !exaPixmapIsPinned(pPixmap))) {
Bool as_dst = pixmaps[0].as_dst; Bool as_dst = pixmaps[0].as_dst;
/* Set up damage tracking */ /* Set up damage tracking */
@ -170,7 +171,7 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
/* This is used by exa to optimize migration. */ /* This is used by exa to optimize migration. */
DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE); DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE);
if (is_offscreen) { if (has_gpu_copy) {
exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width, exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
pPixmap->drawable.height); pPixmap->drawable.height);
@ -189,14 +190,14 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
if (as_dst) if (as_dst)
exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width, exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width,
pPixmap->drawable.height); pPixmap->drawable.height);
} else if (is_offscreen) { } else if (has_gpu_copy) {
pPixmap->devKind = pExaPixmap->fb_pitch; pPixmap->devKind = pExaPixmap->fb_pitch;
exaCopyDirtyToSys(pixmaps); exaCopyDirtyToSys(pixmaps);
} }
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
pPixmap->devKind = pExaPixmap->sys_pitch; pPixmap->devKind = pExaPixmap->sys_pitch;
pExaPixmap->offscreen = FALSE; pExaPixmap->use_gpu_copy = FALSE;
} }
} }
@ -210,8 +211,8 @@ void exaFinishAccess_mixed(PixmapPtr pPixmap, int index)
{ {
ExaPixmapPriv(pPixmap); ExaPixmapPriv(pPixmap);
if (pExaPixmap->pDamage && !pExaPixmap->offscreen && if (pExaPixmap->pDamage && !pExaPixmap->use_gpu_copy &&
exaPixmapIsOffscreen(pPixmap)){ exaPixmapHasGpuCopy(pPixmap)) {
DamageRegionProcessPending(&pPixmap->drawable); DamageRegionProcessPending(&pPixmap->drawable);
if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) { if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) {

View File

@ -93,9 +93,9 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
/* A scratch pixmap will become a driver pixmap right away. */ /* A scratch pixmap will become a driver pixmap right away. */
if (!w || !h) { if (!w || !h) {
exaCreateDriverPixmap_mixed(pPixmap); exaCreateDriverPixmap_mixed(pPixmap);
pExaPixmap->offscreen = exaPixmapIsOffscreen(pPixmap); pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
} else } else
pExaPixmap->offscreen = FALSE; pExaPixmap->use_gpu_copy = FALSE;
/* During a fallback we must prepare access. */ /* During a fallback we must prepare access. */
if (pExaScr->fallback_counter) if (pExaScr->fallback_counter)
@ -111,7 +111,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
ScreenPtr pScreen = pPixmap->drawable.pScreen; ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPrivPtr pExaScr; ExaScreenPrivPtr pExaScr;
ExaPixmapPrivPtr pExaPixmap; ExaPixmapPrivPtr pExaPixmap;
Bool ret, is_offscreen; Bool ret, has_gpu_copy;
if (!pPixmap) if (!pPixmap)
return FALSE; return FALSE;
@ -131,7 +131,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
pExaPixmap->driverPriv = NULL; pExaPixmap->driverPriv = NULL;
} }
pExaPixmap->offscreen = FALSE; pExaPixmap->use_gpu_copy = FALSE;
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
} }
@ -145,8 +145,8 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
} }
} }
is_offscreen = exaPixmapIsOffscreen(pPixmap); has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
if (is_offscreen) { if (has_gpu_copy) {
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
pPixmap->devKind = pExaPixmap->fb_pitch; pPixmap->devKind = pExaPixmap->fb_pitch;
} else { } else {
@ -168,7 +168,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
swap(pExaScr, pScreen, ModifyPixmapHeader); swap(pExaScr, pScreen, ModifyPixmapHeader);
out: out:
if (is_offscreen) { if (has_gpu_copy) {
pExaPixmap->fb_ptr = pPixmap->devPrivate.ptr; pExaPixmap->fb_ptr = pPixmap->devPrivate.ptr;
pExaPixmap->fb_pitch = pPixmap->devKind; pExaPixmap->fb_pitch = pPixmap->devKind;
} else { } else {
@ -219,7 +219,7 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
} }
Bool Bool
exaPixmapIsOffscreen_mixed(PixmapPtr pPixmap) exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap)
{ {
ScreenPtr pScreen = pPixmap->drawable.pScreen; ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv(pScreen); ExaScreenPriv(pScreen);

View File

@ -522,7 +522,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
return NULL; return NULL;
pExaDstPix = ExaGetPixmapPriv (pDstPix); pExaDstPix = ExaGetPixmapPriv (pDstPix);
pExaDstPix->offscreen = TRUE; pExaDstPix->use_gpu_copy = TRUE;
for (area = pExaScr->info->offScreenAreas->prev; for (area = pExaScr->info->offScreenAreas->prev;
area != pExaScr->info->offScreenAreas; area != pExaScr->info->offScreenAreas;
@ -531,7 +531,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
ExaOffscreenArea *prev = area->prev; ExaOffscreenArea *prev = area->prev;
PixmapPtr pSrcPix; PixmapPtr pSrcPix;
ExaPixmapPrivPtr pExaSrcPix; ExaPixmapPrivPtr pExaSrcPix;
Bool save_offscreen; Bool save_use_gpu_copy;
int save_pitch; int save_pitch;
if (area->state != ExaOffscreenAvail || if (area->state != ExaOffscreenAvail ||
@ -576,10 +576,10 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
continue; continue;
} }
save_offscreen = pExaSrcPix->offscreen; save_use_gpu_copy = pExaSrcPix->use_gpu_copy;
save_pitch = pSrcPix->devKind; save_pitch = pSrcPix->devKind;
pExaSrcPix->offscreen = TRUE; pExaSrcPix->use_gpu_copy = TRUE;
pSrcPix->devKind = pExaSrcPix->fb_pitch; pSrcPix->devKind = pExaSrcPix->fb_pitch;
pDstPix->drawable.width = pSrcPix->drawable.width; pDstPix->drawable.width = pSrcPix->drawable.width;
@ -589,7 +589,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
pDstPix->drawable.bitsPerPixel = pSrcPix->drawable.bitsPerPixel; pDstPix->drawable.bitsPerPixel = pSrcPix->drawable.bitsPerPixel;
if (!pExaScr->info->PrepareCopy (pSrcPix, pDstPix, -1, -1, GXcopy, ~0)) { if (!pExaScr->info->PrepareCopy (pSrcPix, pDstPix, -1, -1, GXcopy, ~0)) {
pExaSrcPix->offscreen = save_offscreen; pExaSrcPix->use_gpu_copy = save_use_gpu_copy;
pSrcPix->devKind = save_pitch; pSrcPix->devKind = save_pitch;
area = prev; area = prev;
continue; continue;
@ -646,7 +646,7 @@ ExaOffscreenDefragment (ScreenPtr pScreen)
#endif #endif
pExaSrcPix->fb_ptr = pExaDstPix->fb_ptr; pExaSrcPix->fb_ptr = pExaDstPix->fb_ptr;
pExaSrcPix->offscreen = save_offscreen; pExaSrcPix->use_gpu_copy = save_use_gpu_copy;
pSrcPix->devKind = save_pitch; pSrcPix->devKind = save_pitch;
} }

View File

@ -173,7 +173,7 @@ typedef struct {
AddTrapsProcPtr SavedAddTraps; AddTrapsProcPtr SavedAddTraps;
#endif #endif
void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel);
Bool (*pixmap_is_offscreen) (PixmapPtr pPixmap); Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap);
void (*do_move_in_pixmap) (PixmapPtr pPixmap); void (*do_move_in_pixmap) (PixmapPtr pPixmap);
void (*do_move_out_pixmap) (PixmapPtr pPixmap); void (*do_move_out_pixmap) (PixmapPtr pPixmap);
void (*prepare_access_reg)(PixmapPtr pPixmap, int index, RegionPtr pReg); void (*prepare_access_reg)(PixmapPtr pPixmap, int index, RegionPtr pReg);
@ -283,7 +283,7 @@ extern DevPrivateKey exaGCPrivateKey;
typedef struct { typedef struct {
ExaOffscreenArea *area; ExaOffscreenArea *area;
int score; /**< score for the move-in vs move-out heuristic */ 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 */ CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */
int sys_pitch; /**< pitch of pixmap in system memory */ int sys_pitch; /**< pitch of pixmap in system memory */
@ -539,7 +539,7 @@ exaGetDrawableDeltas (DrawablePtr pDrawable, PixmapPtr pPixmap,
int *xp, int *yp); int *xp, int *yp);
Bool Bool
exaPixmapIsOffscreen(PixmapPtr p); exaPixmapHasGpuCopy(PixmapPtr p);
PixmapPtr PixmapPtr
exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp); exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp);
@ -576,7 +576,7 @@ Bool
exaDestroyPixmap_classic (PixmapPtr pPixmap); exaDestroyPixmap_classic (PixmapPtr pPixmap);
Bool Bool
exaPixmapIsOffscreen_classic(PixmapPtr pPixmap); exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap);
/* exa_driver.c */ /* exa_driver.c */
PixmapPtr PixmapPtr
@ -591,7 +591,7 @@ Bool
exaDestroyPixmap_driver (PixmapPtr pPixmap); exaDestroyPixmap_driver (PixmapPtr pPixmap);
Bool Bool
exaPixmapIsOffscreen_driver(PixmapPtr pPixmap); exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap);
/* exa_mixed.c */ /* exa_mixed.c */
PixmapPtr PixmapPtr
@ -606,7 +606,7 @@ Bool
exaDestroyPixmap_mixed(PixmapPtr pPixmap); exaDestroyPixmap_mixed(PixmapPtr pPixmap);
Bool Bool
exaPixmapIsOffscreen_mixed(PixmapPtr pPixmap); exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap);
/* exa_migration_mixed.c */ /* exa_migration_mixed.c */
void void

View File

@ -320,7 +320,7 @@ exaTryDriverSolidFill(PicturePtr pSrc,
exaDoMigration(pixmaps, 1, TRUE); exaDoMigration(pixmaps, 1, TRUE);
} }
if (!exaPixmapIsOffscreen(pDstPix)) { if (!exaPixmapHasGpuCopy(pDstPix)) {
REGION_UNINIT(pDst->pDrawable->pScreen, &region); REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 0; return 0;
} }
@ -540,7 +540,7 @@ exaCompositeRects(CARD8 op,
/* We have to manage the damage ourselves, since CompositeRects isn't /* We have to manage the damage ourselves, since CompositeRects isn't
* something in the screen that can be managed by the damage extension, * something in the screen that can be managed by the damage extension,
* and EXA depends on damage to track what needs to be migrated between * and EXA depends on damage to track what needs to be migrated between
* offscreen and onscreen. * the gpu and the cpu.
*/ */
/* Compute the overall extents of the composited region - we're making /* Compute the overall extents of the composited region - we're making
@ -752,7 +752,7 @@ exaTryDriverComposite(CARD8 op,
} }
} }
if (!exaPixmapIsOffscreen(pDstPix)) { if (!exaPixmapHasGpuCopy(pDstPix)) {
REGION_UNINIT(pDst->pDrawable->pScreen, &region); REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 0; return 0;
} }