diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-02-27 16:37:28 +0100 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-02-27 16:37:28 +0100 |
commit | 4cfb36f6ad2df01215028fec48d99239a0e4496b (patch) | |
tree | ea547b39c0e7ab0248bed546e689c7bbd478b429 /exa/exa.c | |
parent | 4bf707f01822abe99286909fd561da7e7a4211d6 (diff) |
EXA: Handle separate alpha maps properly in Composite fallback, take two.
Preserve the EXA ABI by introducing a new driver flag EXA_SUPPORTS_PREPARE_AUX.
If the driver doesn't set this flag, we have to assume any Prepare/FinishAccess
driver hooks can't handle the EXA_PREPARE_AUX* indices, so we move out such
pixmaps at PrepareAccess time.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 .
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Diffstat (limited to 'exa/exa.c')
-rw-r--r-- | exa/exa.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -538,6 +538,12 @@ ExaDoPrepareAccess(DrawablePtr pDrawable, int index) if (pExaScr->info->PrepareAccess == NULL) return; + if (index >= EXA_PREPARE_AUX0 && + !(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) { + exaMoveOutPixmap (pPixmap); + return; + } + if (!(*pExaScr->info->PrepareAccess) (pPixmap, index)) { ExaPixmapPriv (pPixmap); if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) @@ -597,6 +603,13 @@ exaFinishAccess(DrawablePtr pDrawable, int index) if (!exaPixmapIsOffscreen (pPixmap)) return; + if (index >= EXA_PREPARE_AUX0 && + !(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) { + ErrorF("EXA bug: Trying to call driver FinishAccess hook with " + "unsupported index EXA_PREPARE_AUX*\n"); + return; + } + (*pExaScr->info->FinishAccess) (pPixmap, index); } |