aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/swap_interval.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/glx/swap_interval.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/glx/swap_interval.c')
-rw-r--r--xorg-server/glx/swap_interval.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/xorg-server/glx/swap_interval.c b/xorg-server/glx/swap_interval.c
index 699f13746..7533d2642 100644
--- a/xorg-server/glx/swap_interval.c
+++ b/xorg-server/glx/swap_interval.c
@@ -39,53 +39,55 @@
#include "dispatch.h"
#include "glxbyteorder.h"
-static int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap);
+static int DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap);
-int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap)
+int
+DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap)
{
- xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc;
ClientPtr client = cl->client;
const GLXContextTag tag = req->contextTag;
__GLXcontext *cx;
GLint interval;
-
cx = __glXLookupContextByTag(cl, tag);
if ((cx == NULL) || (cx->pGlxScreen == NULL)) {
- client->errorValue = tag;
- return __glXError(GLXBadContext);
+ client->errorValue = tag;
+ return __glXError(GLXBadContext);
}
-
+
if (cx->pGlxScreen->swapInterval == NULL) {
- LogMessage(X_ERROR, "AIGLX: cx->pGlxScreen->swapInterval == NULL\n");
- client->errorValue = tag;
- return __glXError(GLXUnsupportedPrivateRequest);
+ LogMessage(X_ERROR, "AIGLX: cx->pGlxScreen->swapInterval == NULL\n");
+ client->errorValue = tag;
+ return __glXError(GLXUnsupportedPrivateRequest);
}
if (cx->drawPriv == NULL) {
- client->errorValue = tag;
- return BadValue;
+ client->errorValue = tag;
+ return BadValue;
}
-
+
pc += __GLX_VENDPRIV_HDR_SIZE;
interval = (do_swap)
- ? bswap_32(*(int *)(pc + 0))
- : *(int *)(pc + 0);
+ ? bswap_32(*(int *) (pc + 0))
+ : *(int *) (pc + 0);
if (interval <= 0)
- return BadValue;
+ return BadValue;
- (void) (*cx->pGlxScreen->swapInterval)(cx->drawPriv, interval);
+ (void) (*cx->pGlxScreen->swapInterval) (cx->drawPriv, interval);
return Success;
}
-int __glXDisp_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_SwapIntervalSGI(__GLXclientState * cl, GLbyte * pc)
{
return DoSwapInterval(cl, pc, 0);
}
-int __glXDispSwap_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_SwapIntervalSGI(__GLXclientState * cl, GLbyte * pc)
{
return DoSwapInterval(cl, pc, 1);
}