aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-10 17:07:55 +0200
committermarha <marha@users.sourceforge.net>2012-04-10 17:07:55 +0200
commit971b6f891b3d36cfdfbbac2206d631c571f1d982 (patch)
tree239f207fc98046044c9eb80793e558da6303d21f /xorg-server/hw/xwin/swrastwgl_dri/glwrap.c
parent746b42cbf983768e6ffeb374d48f497a626c2af5 (diff)
downloadvcxsrv-971b6f891b3d36cfdfbbac2206d631c571f1d982.tar.gz
vcxsrv-971b6f891b3d36cfdfbbac2206d631c571f1d982.tar.bz2
vcxsrv-971b6f891b3d36cfdfbbac2206d631c571f1d982.zip
Synchronised files
Diffstat (limited to 'xorg-server/hw/xwin/swrastwgl_dri/glwrap.c')
-rw-r--r--xorg-server/hw/xwin/swrastwgl_dri/glwrap.c75
1 files changed, 37 insertions, 38 deletions
diff --git a/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c b/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c
index 44e287bc9..d74addb69 100644
--- a/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c
+++ b/xorg-server/hw/xwin/swrastwgl_dri/glwrap.c
@@ -53,49 +53,44 @@ static unsigned int glWinDirectProcCalls = 0;
void
glWinCallDelta(void)
{
- static unsigned int glWinIndirectProcCallsLast = 0;
- static unsigned int glWinDirectProcCallsLast = 0;
- if ((glWinIndirectProcCalls != glWinIndirectProcCallsLast) ||
- (glWinDirectProcCalls != glWinDirectProcCallsLast))
- {
- glWinDirectProcCallsLast = glWinDirectProcCalls;
- glWinIndirectProcCallsLast = glWinIndirectProcCalls;
+ static unsigned int glWinIndirectProcCallsLast = 0;
+ static unsigned int glWinDirectProcCallsLast = 0;
+
+ if ((glWinIndirectProcCalls != glWinIndirectProcCallsLast) ||
+ (glWinDirectProcCalls != glWinDirectProcCallsLast)) {
+ glWinDirectProcCallsLast = glWinDirectProcCalls;
+ glWinIndirectProcCallsLast = glWinIndirectProcCalls;
}
}
#endif
static __inline PROC
-glWinResolveHelper(PROC *cache, char *symbol)
+glWinResolveHelper(PROC * cache, char *symbol)
{
- PROC proc = NULL;
-
- /* If not yet cached, call wglGetProcAddress */
- if ((*cache) == NULL)
- {
- proc = wglGetProcAddress(symbol);
- if (proc == NULL)
- {
- ErrorF("glwrap: Can't resolve \"%s\"\n", symbol);
- (*cache) = (PROC)-1;
+ PROC proc = NULL;
+
+ /* If not yet cached, call wglGetProcAddress */
+ if ((*cache) == NULL) {
+ proc = wglGetProcAddress(symbol);
+ if (proc == NULL) {
+ ErrorF("glwrap: Can't resolve \"%s\"\n", symbol);
+ (*cache) = (PROC) - 1;
}
- else
- {
- ErrorF("glwrap: Resolved \"%s\"\n", symbol);
- (*cache) = proc;
+ else {
+ ErrorF("glwrap: Resolved \"%s\"\n", symbol);
+ (*cache) = proc;
}
}
- /* Cached wglGetProcAddress failure */
- else if ((*cache) == (PROC)-1)
- {
- proc = 0;
+ /* Cached wglGetProcAddress failure */
+ else if ((*cache) == (PROC) - 1) {
+ proc = 0;
}
- /* Cached wglGetProcAddress result */
- else
- {
- proc = (*cache);
+ /* Cached wglGetProcAddress result */
+ else {
+ proc = (*cache);
}
- return proc;
+ return proc;
}
#ifdef _DEBUG
@@ -132,20 +127,24 @@ glWinResolveHelper(PROC *cache, char *symbol)
Special non-static wrapper for glGetString for debug output
*/
-const GLubyte* glGetStringWrapperNonstatic(GLenum name)
+const GLubyte *
+glGetStringWrapperNonstatic(GLenum name)
{
- return glGetString(name);
+ return glGetString(name);
}
/*
Special non-static wrapper for glAddSwapHintRectWIN for copySubBuffers
*/
-typedef void (__stdcall *PFNGLADDSWAPHINTRECTWIN)(GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (__stdcall * PFNGLADDSWAPHINTRECTWIN) (GLint x, GLint y,
+ GLsizei width,
+ GLsizei height);
-void glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width, GLsizei height)
+void
+glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width,
+ GLsizei height)
{
- RESOLVE(PFNGLADDSWAPHINTRECTWIN, "glAddSwapHintRectWIN");
- proc(x, y, width, height);
+ RESOLVE(PFNGLADDSWAPHINTRECTWIN, "glAddSwapHintRectWIN");
+ proc(x, y, width, height);
}
-