mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-11 23:43:06 +00:00
exa: implement exaMoveInPixmap for "mixed"
- This can be used to force creation of driver pixmap. - Not for 1 or 4 bpp. - Driver can still fail (driver) pixmap creation.
This commit is contained in:
parent
9d2a7128d3
commit
e8ac2ed5dc
5 changed files with 59 additions and 3 deletions
32
exa/exa.c
32
exa/exa.c
|
|
@ -1059,12 +1059,16 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_mixed);
|
||||
pExaScr->do_migration = exaDoMigration_mixed;
|
||||
pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_mixed;
|
||||
pExaScr->do_move_in_pixmap = exaMoveInPixmap_mixed;
|
||||
pExaScr->do_move_out_pixmap = NULL;
|
||||
} else {
|
||||
wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_driver);
|
||||
wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_driver);
|
||||
wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_driver);
|
||||
pExaScr->do_migration = NULL;
|
||||
pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_driver;
|
||||
pExaScr->do_move_in_pixmap = NULL;
|
||||
pExaScr->do_move_out_pixmap = NULL;
|
||||
}
|
||||
} else {
|
||||
wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_classic);
|
||||
|
|
@ -1072,6 +1076,8 @@ exaDriverInit (ScreenPtr pScreen,
|
|||
wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_classic);
|
||||
pExaScr->do_migration = exaDoMigration_classic;
|
||||
pExaScr->pixmap_is_offscreen = exaPixmapIsOffscreen_classic;
|
||||
pExaScr->do_move_in_pixmap = exaMoveInPixmap_classic;
|
||||
pExaScr->do_move_out_pixmap = exaMoveOutPixmap_classic;
|
||||
}
|
||||
if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) {
|
||||
LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %lu bytes\n",
|
||||
|
|
@ -1188,3 +1194,29 @@ exaDoMigration (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
|
|||
if (pExaScr->do_migration)
|
||||
(*pExaScr->do_migration)(pixmaps, npixmaps, can_accel);
|
||||
}
|
||||
|
||||
void
|
||||
exaMoveInPixmap (PixmapPtr pPixmap)
|
||||
{
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
ExaScreenPriv(pScreen);
|
||||
|
||||
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
|
||||
return;
|
||||
|
||||
if (pExaScr->do_move_in_pixmap)
|
||||
(*pExaScr->do_move_in_pixmap)(pPixmap);
|
||||
}
|
||||
|
||||
void
|
||||
exaMoveOutPixmap (PixmapPtr pPixmap)
|
||||
{
|
||||
ScreenPtr pScreen = pPixmap->drawable.pScreen;
|
||||
ExaScreenPriv(pScreen);
|
||||
|
||||
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
|
||||
return;
|
||||
|
||||
if (pExaScr->do_move_out_pixmap)
|
||||
(*pExaScr->do_move_out_pixmap)(pPixmap);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue