aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/exa/exa_mixed.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-02 17:33:15 +0000
committermarha <marha@users.sourceforge.net>2009-12-02 17:33:15 +0000
commit314d225f3a60cc0ea63c292a2c2ffe3609e7c739 (patch)
tree181562a86ee74db9182bd9b60d258d3fed6642ee /xorg-server/exa/exa_mixed.c
parent4ac4a5b7ce8cc8f195d69a42da10d386eaa5c056 (diff)
downloadvcxsrv-314d225f3a60cc0ea63c292a2c2ffe3609e7c739.tar.gz
vcxsrv-314d225f3a60cc0ea63c292a2c2ffe3609e7c739.tar.bz2
vcxsrv-314d225f3a60cc0ea63c292a2c2ffe3609e7c739.zip
Xserver git update
Diffstat (limited to 'xorg-server/exa/exa_mixed.c')
-rw-r--r--xorg-server/exa/exa_mixed.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/xorg-server/exa/exa_mixed.c b/xorg-server/exa/exa_mixed.c
index b29ee353c..764c7dd58 100644
--- a/xorg-server/exa/exa_mixed.c
+++ b/xorg-server/exa/exa_mixed.c
@@ -93,9 +93,13 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
/* A scratch pixmap will become a driver pixmap right away. */
if (!w || !h) {
exaCreateDriverPixmap_mixed(pPixmap);
- pExaPixmap->offscreen = exaPixmapIsOffscreen(pPixmap);
+ pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
} else
- pExaPixmap->offscreen = FALSE;
+ pExaPixmap->use_gpu_copy = FALSE;
+
+ /* During a fallback we must prepare access. */
+ if (pExaScr->fallback_counter)
+ exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST);
return pPixmap;
}
@@ -107,7 +111,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPrivPtr pExaScr;
ExaPixmapPrivPtr pExaPixmap;
- Bool ret, is_offscreen;
+ Bool ret, has_gpu_copy;
if (!pPixmap)
return FALSE;
@@ -127,7 +131,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
pExaPixmap->driverPriv = NULL;
}
- pExaPixmap->offscreen = FALSE;
+ pExaPixmap->use_gpu_copy = FALSE;
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
}
@@ -141,8 +145,8 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
}
}
- is_offscreen = exaPixmapIsOffscreen(pPixmap);
- if (is_offscreen) {
+ has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+ if (has_gpu_copy) {
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
pPixmap->devKind = pExaPixmap->fb_pitch;
} else {
@@ -164,7 +168,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
swap(pExaScr, pScreen, ModifyPixmapHeader);
out:
- if (is_offscreen) {
+ if (has_gpu_copy) {
pExaPixmap->fb_ptr = pPixmap->devPrivate.ptr;
pExaPixmap->fb_pitch = pPixmap->devKind;
} else {
@@ -188,6 +192,10 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
{
ExaPixmapPriv (pPixmap);
+ /* During a fallback we must finish access, but we don't know the index. */
+ if (pExaScr->fallback_counter)
+ exaFinishAccess(&pPixmap->drawable, -1);
+
if (pExaScr->deferred_mixed_pixmap == pPixmap)
pExaScr->deferred_mixed_pixmap = NULL;
@@ -211,7 +219,7 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap)
}
Bool
-exaPixmapIsOffscreen_mixed(PixmapPtr pPixmap)
+exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap)
{
ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv(pScreen);