aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/dri2/dri2ext.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-16 09:32:42 +0000
committermarha <marha@users.sourceforge.net>2010-04-16 09:32:42 +0000
commit0afd2d366de6470b72f0d305643be9afd8cc461d (patch)
tree9363104b0080ddd001256d1b3a0eceae078f13a0 /xorg-server/hw/xfree86/dri2/dri2ext.c
parent6412df1b3df28c6213b43821c4a98cc3857d9a3f (diff)
downloadvcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.tar.gz
vcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.tar.bz2
vcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.zip
git update 16/4/2010
Diffstat (limited to 'xorg-server/hw/xfree86/dri2/dri2ext.c')
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2ext.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c
index bd92fd304..094d54dc0 100644
--- a/xorg-server/hw/xfree86/dri2/dri2ext.c
+++ b/xorg-server/hw/xfree86/dri2/dri2ext.c
@@ -80,8 +80,8 @@ ProcDRI2QueryVersion(ClientPtr client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
- rep.majorVersion = SERVER_DRI2_MAJOR_VERSION;
- rep.minorVersion = SERVER_DRI2_MINOR_VERSION;
+ rep.majorVersion = dri2_major;
+ rep.minorVersion = dri2_minor;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
@@ -384,6 +384,13 @@ ProcDRI2SwapBuffers(ClientPtr client)
DixReadAccess | DixWriteAccess, &pDrawable, &status))
return status;
+ /*
+ * Ensures an out of control client can't exhaust our swap queue, and
+ * also orders swaps.
+ */
+ if (DRI2ThrottleClient(client, pDrawable))
+ return client->noClientException;
+
target_msc = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi);
divisor = vals_to_card64(stuff->divisor_lo, stuff->divisor_hi);
remainder = vals_to_card64(stuff->remainder_lo, stuff->remainder_hi);