aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/exa/exa.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-15 08:09:08 +0000
committermarha <marha@users.sourceforge.net>2009-12-15 08:09:08 +0000
commitc915fe74ff1b1d02f7506a187bc9b588f5c21f97 (patch)
tree7ecc8f8867bac10fcfc1299469333178f7cf5838 /xorg-server/exa/exa.c
parent0925cb4f76a1667fb3777efbe6a0e0e69c4cca3c (diff)
parent9b17452909d3140fa33a753cadfaa6e9006b9685 (diff)
downloadvcxsrv-c915fe74ff1b1d02f7506a187bc9b588f5c21f97.tar.gz
vcxsrv-c915fe74ff1b1d02f7506a187bc9b588f5c21f97.tar.bz2
vcxsrv-c915fe74ff1b1d02f7506a187bc9b588f5c21f97.zip
svn merge ^/branches/released
Diffstat (limited to 'xorg-server/exa/exa.c')
-rw-r--r--xorg-server/exa/exa.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/xorg-server/exa/exa.c b/xorg-server/exa/exa.c
index 023288c12..b3c5bfffe 100644
--- a/xorg-server/exa/exa.c
+++ b/xorg-server/exa/exa.c
@@ -283,7 +283,7 @@ exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp)
}
/**
- * Returns TRUE if pixmap can be accessed offscreen.
+ * Returns TRUE if the pixmap GPU copy is being accessed.
*/
Bool
ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
@@ -291,7 +291,7 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv (pScreen);
ExaPixmapPriv(pPixmap);
- Bool has_gpu_copy;
+ Bool has_gpu_copy, ret;
int i;
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
@@ -304,7 +304,7 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) {
if (pExaScr->access[i].pixmap == pPixmap) {
pExaScr->access[i].count++;
- return TRUE;
+ return pExaScr->access[i].retval;
}
}
@@ -323,29 +323,33 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
- if (has_gpu_copy && pExaPixmap->fb_ptr)
+ if (has_gpu_copy && pExaPixmap->fb_ptr) {
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
- else
+ ret = TRUE;
+ } else {
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
+ ret = FALSE;
+ }
/* Store so we can handle repeated / nested calls. */
pExaScr->access[index].pixmap = pPixmap;
pExaScr->access[index].count = 1;
if (!has_gpu_copy)
- return FALSE;
+ goto out;
exaWaitSync (pScreen);
if (pExaScr->info->PrepareAccess == NULL)
- return TRUE;
+ goto out;
if (index >= EXA_PREPARE_AUX_DEST &&
!(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) {
if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED)
FatalError("Unsupported AUX indices used on a pinned pixmap.\n");
exaMoveOutPixmap (pPixmap);
- return FALSE;
+ ret = FALSE;
+ goto out;
}
if (!(*pExaScr->info->PrepareAccess) (pPixmap, index)) {
@@ -353,11 +357,15 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
!(pExaScr->info->flags & EXA_MIXED_PIXMAPS))
FatalError("Driver failed PrepareAccess on a pinned pixmap.\n");
exaMoveOutPixmap (pPixmap);
-
- return FALSE;
+ ret = FALSE;
+ goto out;
}
- return TRUE;
+ ret = TRUE;
+
+out:
+ pExaScr->access[index].retval = ret;
+ return ret;
}
/**