exa: add new flags to denote driver handles all pixmap migration/hiding

This commit is contained in:
Dave Airlie 2007-10-03 11:59:52 +10:00
parent 1df1fee82d
commit 566dd3b7d7
3 changed files with 13 additions and 4 deletions

View File

@ -410,7 +410,7 @@ exaPixmapIsOffscreen(PixmapPtr p)
save_ptr = p->devPrivate.ptr; save_ptr = p->devPrivate.ptr;
if (!save_ptr && pExaPixmap) if (!save_ptr && pExaPixmap && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS))
p->devPrivate.ptr = ExaGetPixmapAddress(p); p->devPrivate.ptr = ExaGetPixmapAddress(p);
if (pExaScr->info->PixmapIsOffscreen) if (pExaScr->info->PixmapIsOffscreen)
@ -460,7 +460,7 @@ ExaDoPrepareAccess(DrawablePtr pDrawable, int index)
Bool offscreen = exaPixmapIsOffscreen(pPixmap); Bool offscreen = exaPixmapIsOffscreen(pPixmap);
/* Unhide pixmap pointer */ /* Unhide pixmap pointer */
if (pPixmap->devPrivate.ptr == NULL) { if (pPixmap->devPrivate.ptr == NULL && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
} }
@ -521,8 +521,7 @@ exaFinishAccess(DrawablePtr pDrawable, int index)
ExaPixmapPriv (pPixmap); ExaPixmapPriv (pPixmap);
/* Rehide pixmap pointer if we're doing that. */ /* Rehide pixmap pointer if we're doing that. */
if (pExaPixmap) if (pExaPixmap && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
{
pPixmap->devPrivate.ptr = NULL; pPixmap->devPrivate.ptr = NULL;
} }

View File

@ -733,6 +733,13 @@ typedef struct _ExaDriver {
* (right-to-left, bottom-to-top). * (right-to-left, bottom-to-top).
*/ */
#define EXA_TWO_BITBLT_DIRECTIONS (1 << 2) #define EXA_TWO_BITBLT_DIRECTIONS (1 << 2)
/**
* EXA_HANDLES_PIXMAPS indicates to EXA that the driver can handle
* all pixmap addressing and migration.
*/
#define EXA_HANDLES_PIXMAPS (1 << 3)
/** @} */ /** @} */
ExaDriverPtr ExaDriverPtr

View File

@ -553,6 +553,9 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
ExaScreenPriv(pScreen); ExaScreenPriv(pScreen);
int i, j; int i, j;
if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS)
return;
/* If this debugging flag is set, check each pixmap for whether it is marked /* If this debugging flag is set, check each pixmap for whether it is marked
* as clean, and if so, actually check if that's the case. This should help * as clean, and if so, actually check if that's the case. This should help
* catch issues with failing to mark a drawable as dirty. While it will * catch issues with failing to mark a drawable as dirty. While it will