aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/exa/exa_mixed.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-14 10:22:19 +0000
committermarha <marha@users.sourceforge.net>2009-12-14 10:22:19 +0000
commit9b17452909d3140fa33a753cadfaa6e9006b9685 (patch)
tree4abbb4b660ee9125cb0c20dab5a1c8de9f5a4a2d /xorg-server/exa/exa_mixed.c
parent75d2bbcf0f39b9c85bc270728343f61dabebce2d (diff)
downloadvcxsrv-9b17452909d3140fa33a753cadfaa6e9006b9685.tar.gz
vcxsrv-9b17452909d3140fa33a753cadfaa6e9006b9685.tar.bz2
vcxsrv-9b17452909d3140fa33a753cadfaa6e9006b9685.zip
Git update 14/12/2009
Diffstat (limited to 'xorg-server/exa/exa_mixed.c')
-rw-r--r--xorg-server/exa/exa_mixed.c42
1 files changed, 39 insertions, 3 deletions
diff --git a/xorg-server/exa/exa_mixed.c b/xorg-server/exa/exa_mixed.c
index 764c7dd58..155ed47c5 100644
--- a/xorg-server/exa/exa_mixed.c
+++ b/xorg-server/exa/exa_mixed.c
@@ -135,17 +135,53 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
}
- if (pExaPixmap->driverPriv) {
- if (width > 0 && height > 0 && bitsPerPixel > 0) {
+ has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+
+ if (width <= 0)
+ width = pPixmap->drawable.width;
+
+ if (height <= 0)
+ height = pPixmap->drawable.height;
+
+ if (bitsPerPixel <= 0) {
+ if (depth <= 0)
+ bitsPerPixel = pPixmap->drawable.bitsPerPixel;
+ else
+ bitsPerPixel = BitsPerPixel(depth);
+ }
+
+ if (depth <= 0)
+ depth = pPixmap->drawable.depth;
+
+ if (width != pPixmap->drawable.width ||
+ height != pPixmap->drawable.height ||
+ depth != pPixmap->drawable.depth ||
+ bitsPerPixel != pPixmap->drawable.bitsPerPixel) {
+ if (pExaPixmap->driverPriv) {
exaSetFbPitch(pExaScr, pExaPixmap,
width, height, bitsPerPixel);
exaSetAccelBlock(pExaScr, pExaPixmap,
width, height, bitsPerPixel);
+ REGION_EMPTY(pScreen, &pExaPixmap->validFB);
}
+
+ /* Need to re-create system copy if there's also a GPU copy */
+ if (has_gpu_copy && pExaPixmap->sys_ptr) {
+ free(pExaPixmap->sys_ptr);
+ pExaPixmap->sys_ptr = NULL;
+ pExaPixmap->sys_pitch = devKind > 0 ? devKind :
+ PixmapBytePad(width, depth);
+ DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
+ DamageDestroy(pExaPixmap->pDamage);
+ pExaPixmap->pDamage = NULL;
+ REGION_EMPTY(pScreen, &pExaPixmap->validSys);
+
+ if (pExaScr->deferred_mixed_pixmap == pPixmap)
+ pExaScr->deferred_mixed_pixmap = NULL;
+ }
}
- has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
if (has_gpu_copy) {
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
pPixmap->devKind = pExaPixmap->fb_pitch;