diff options
author | marha <marha@users.sourceforge.net> | 2009-12-02 19:35:37 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-12-02 19:35:37 +0000 |
commit | 8f2c5e2f41f211bed814be2889da16fc43e6f147 (patch) | |
tree | e1f2715f63544d39302d6daa2cb0d4f53d295ebc /xorg-server/exa/exa_mixed.c | |
parent | b404fe88bb87f42267cab4682b81f38cc442e617 (diff) | |
parent | 314d225f3a60cc0ea63c292a2c2ffe3609e7c739 (diff) | |
download | vcxsrv-8f2c5e2f41f211bed814be2889da16fc43e6f147.tar.gz vcxsrv-8f2c5e2f41f211bed814be2889da16fc43e6f147.tar.bz2 vcxsrv-8f2c5e2f41f211bed814be2889da16fc43e6f147.zip |
svn merge ^/branches/released
Diffstat (limited to 'xorg-server/exa/exa_mixed.c')
-rw-r--r-- | xorg-server/exa/exa_mixed.c | 24 |
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); |