diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-08-05 16:12:16 +0200 |
---|---|---|
committer | Maarten Maathuis <madman2003@gmail.com> | 2009-08-06 23:48:14 +0200 |
commit | e8ac2ed5dc4c2ac0a5e1e1f371f94c15b1c729dd (patch) | |
tree | d65f416d213077ad2594d8b182b6d34db2afc2dd /exa/exa.c | |
parent | 9d2a7128d3e66b8c076a714d69f84bcad49391b9 (diff) |
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.
Diffstat (limited to 'exa/exa.c')
-rw-r--r-- | exa/exa.c | 32 |
1 files changed, 32 insertions, 0 deletions
@@ -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); +} |