aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-06-26 09:35:54 +0200
committermarha <marha@users.sourceforge.net>2014-06-26 09:35:54 +0200
commitd47db8d4713de42ccca071c9e8401fc7a213ed49 (patch)
tree7189b3c025315c514ae9d2835810b94d0e4e0e01 /xorg-server/hw/xfree86
parent880395e8c3f451bf34b96da76fcee133b356e966 (diff)
parentc30d5eefc96925b4bef781806c7a0114eca1b8e0 (diff)
downloadvcxsrv-d47db8d4713de42ccca071c9e8401fc7a213ed49.tar.gz
vcxsrv-d47db8d4713de42ccca071c9e8401fc7a213ed49.tar.bz2
vcxsrv-d47db8d4713de42ccca071c9e8401fc7a213ed49.zip
Merge remote-tracking branch 'origin/released'
* origin/released: Opdated to openssl-1.0.1h xkeyboard-config fontconfig libX11 libxcb xcb-proto mesa xserver git update 26 June 2014 Conflicts: openssl/Makefile
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index 6dd77963c..6459f11b1 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -130,6 +130,7 @@ typedef struct _DRI2Screen {
HandleExposuresProcPtr HandleExposures;
ConfigNotifyProcPtr ConfigNotify;
+ SetWindowPixmapProcPtr SetWindowPixmap;
DRI2CreateBuffer2ProcPtr CreateBuffer2;
DRI2DestroyBuffer2ProcPtr DestroyBuffer2;
DRI2CopyRegion2ProcPtr CopyRegion2;
@@ -415,18 +416,14 @@ DRI2DrawableGone(void *p, XID id)
}
static DRI2BufferPtr
-create_buffer(DrawablePtr pDraw,
+create_buffer(DRI2ScreenPtr ds, DrawablePtr pDraw,
unsigned int attachment, unsigned int format)
{
- ScreenPtr primeScreen;
- DRI2DrawablePtr pPriv;
- DRI2ScreenPtr ds;
DRI2BufferPtr buffer;
- pPriv = DRI2GetDrawable(pDraw);
- primeScreen = GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
- ds = DRI2GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
if (ds->CreateBuffer2)
- buffer = (*ds->CreateBuffer2)(primeScreen, pDraw, attachment, format);
+ buffer = (*ds->CreateBuffer2)(GetScreenPrime(pDraw->pScreen,
+ DRI2GetDrawable(pDraw)->prime_id),
+ pDraw, attachment, format);
else
buffer = (*ds->CreateBuffer)(pDraw, attachment, format);
return buffer;
@@ -475,7 +472,7 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds,
if ((old_buf < 0)
|| attachment == DRI2BufferFrontLeft
|| !dimensions_match || (pPriv->buffers[old_buf]->format != format)) {
- *buffer = create_buffer (pDraw, attachment, format);
+ *buffer = create_buffer(ds, pDraw, attachment, format);
return TRUE;
}
@@ -538,7 +535,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
return NULL;
}
- ds = DRI2GetScreen(pDraw->pScreen);
+ ds = DRI2GetScreenPrime(pDraw->pScreen, pPriv->prime_id);
dimensions_match = (pDraw->width == pPriv->width)
&& (pDraw->height == pPriv->height);
@@ -1382,6 +1379,21 @@ DRI2ConfigNotify(WindowPtr pWin, int x, int y, int w, int h, int bw,
return Success;
}
+static void
+DRI2SetWindowPixmap(WindowPtr pWin, PixmapPtr pPix)
+{
+ DrawablePtr pDraw = (DrawablePtr) pWin;
+ ScreenPtr pScreen = pDraw->pScreen;
+ DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
+
+ pScreen->SetWindowPixmap = ds->SetWindowPixmap;
+ (*pScreen->SetWindowPixmap) (pWin, pPix);
+ ds->SetWindowPixmap = pScreen->SetWindowPixmap;
+ pScreen->SetWindowPixmap = DRI2SetWindowPixmap;
+
+ DRI2InvalidateDrawableAll(pDraw);
+}
+
#define MAX_PRIME DRI2DriverPrimeMask
static int
get_prime_id(void)
@@ -1528,6 +1540,9 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
ds->ConfigNotify = pScreen->ConfigNotify;
pScreen->ConfigNotify = DRI2ConfigNotify;
+ ds->SetWindowPixmap = pScreen->SetWindowPixmap;
+ pScreen->SetWindowPixmap = DRI2SetWindowPixmap;
+
xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n");
for (i = 0; i < sizeof(driverTypeNames) / sizeof(driverTypeNames[0]); i++) {
if (i < ds->numDrivers && ds->driverNames[i]) {
@@ -1552,6 +1567,7 @@ DRI2CloseScreen(ScreenPtr pScreen)
DRI2ScreenPtr ds = DRI2GetScreen(pScreen);
pScreen->ConfigNotify = ds->ConfigNotify;
+ pScreen->SetWindowPixmap = ds->SetWindowPixmap;
if (ds->prime_id)
prime_id_allocate_bitmask &= ~(1 << ds->prime_id);