mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 573889, part 0: Move the DEBUG_GL_ERROR_CHECK() macro into GLContext.h. r=vlad
This commit is contained in:
parent
e4744c5e63
commit
7be702f00b
@ -384,16 +384,6 @@ protected:
|
||||
LayerManagerOGL *mOGLManager;
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DEBUG_GL_ERROR_CHECK(cx) do { \
|
||||
/*fprintf (stderr, "trace %s %d\n", __FILE__, __LINE__);*/ \
|
||||
GLenum err = (cx)->fGetError(); \
|
||||
if (err) { fprintf (stderr, "GL ERROR: 0x%04x at %s:%d\n", err, __FILE__, __LINE__); } \
|
||||
} while (0)
|
||||
#else
|
||||
#define DEBUG_GL_ERROR_CHECK(cx) do { } while (0)
|
||||
#endif
|
||||
|
||||
} /* layers */
|
||||
} /* mozilla */
|
||||
|
||||
|
@ -41,6 +41,8 @@
|
||||
#ifndef GLCONTEXT_H_
|
||||
#define GLCONTEXT_H_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@ -512,6 +514,21 @@ public:
|
||||
|
||||
};
|
||||
|
||||
inline void
|
||||
GLDebugPrintError(GLContext* aCx, const char* const aFile, int aLine)
|
||||
{
|
||||
GLenum err = aCx->fGetError();
|
||||
if (err) {
|
||||
fprintf(stderr, "GL ERROR: 0x%04x at %s:%d\n", err, aFile, aLine);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
# define DEBUG_GL_ERROR_CHECK(cx) mozilla::gl::GLDebugPrintError(cx, __FILE__, __LINE__)
|
||||
#else
|
||||
# define DEBUG_GL_ERROR_CHECK(cx) do { } while (0)
|
||||
#endif
|
||||
|
||||
} /* namespace gl */
|
||||
} /* namespace mozilla */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user