exa: Split out some classic and driver allocated pixmap code into seperate files

- Create a few seperate functions and a few private function pointers.
- Replace a few if conditions with a check for pExaPix->pDamage instead.
- This is in preperation of a third scheme that lies somewhere in between.
- Code clarity would have suffered (i started working on it and didn't like the mess).
This commit is contained in:
Maarten Maathuis 2009-07-22 21:35:41 +02:00
commit ac7ac913fd
7 changed files with 590 additions and 331 deletions

View file

@ -1015,7 +1015,7 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
(*pExaScr->info->DoneSolid) (pPixmap);
exaMarkSync(pDrawable->pScreen);
if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS) &&
if (pExaPixmap->pDamage &&
pDrawable->width == 1 && pDrawable->height == 1 &&
pDrawable->bitsPerPixel != 24) {
ExaPixmapPriv(pPixmap);
@ -1233,13 +1233,14 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
{
ExaScreenPriv (pDrawable->pScreen);
PixmapPtr pPix = exaGetDrawablePixmap (pDrawable);
ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv (pPix);
int xoff, yoff;
Bool ok;
if (pExaScr->swappedOut)
goto fallback;
if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
if (pExaPixmap->pDamage) {
BoxRec Box;
RegionRec Reg;
ExaMigrationRec pixmaps[1];