From 865af20e32591176d03acf984d9b5788d5ebce21 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 14 Jul 2010 06:40:19 +0000 Subject: xserver libxcb git update 14/7/2010 --- xorg-server/exa/exa.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'xorg-server/exa/exa.c') diff --git a/xorg-server/exa/exa.c b/xorg-server/exa/exa.c index 823c9a23f..eda9ad7a7 100644 --- a/xorg-server/exa/exa.c +++ b/xorg-server/exa/exa.c @@ -435,6 +435,29 @@ exaFinishAccess(DrawablePtr pDrawable, int index) (*pExaScr->info->FinishAccess) (pPixmap, i); } + +/** + * Helper for things common to all schemes when a pixmap is destroyed + */ +void +exaDestroyPixmap(PixmapPtr pPixmap) +{ + ExaScreenPriv(pPixmap->drawable.pScreen); + int i; + + /* Finish access if it was prepared (e.g. pixmap created during + * software fallback) + */ + for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { + if (pExaScr->access[i].pixmap == pPixmap) { + exaFinishAccess(&pPixmap->drawable, i); + pExaScr->access[i].pixmap = NULL; + break; + } + } +} + + /** * Here begins EXA's GC code. * Do not ever access the fb/mi layer directly. -- cgit v1.2.3