mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 728631 - remove a bunch of accidentally-committed debug code.
This commit is contained in:
parent
f164e7a1bc
commit
8fd2db46fd
@ -62,7 +62,7 @@ using namespace mozilla::gfx;
|
||||
namespace mozilla {
|
||||
namespace gl {
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
// see comment near declaration in GLContext.h. Should be thread-local.
|
||||
GLContext* GLContext::sCurrentGLContext = nsnull;
|
||||
#endif
|
||||
@ -426,7 +426,7 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
|
||||
}
|
||||
|
||||
if (mInitialized) {
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
static bool once = false;
|
||||
if (!once) {
|
||||
const char *vendors[VendorOther] = {
|
||||
@ -545,7 +545,7 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
|
||||
UpdateActualFormat();
|
||||
}
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
if (PR_GetEnv("MOZ_GL_DEBUG"))
|
||||
sDebugMode |= DebugEnabled;
|
||||
|
||||
@ -576,7 +576,7 @@ GLContext::InitExtensions()
|
||||
const GLubyte *extensions = fGetString(LOCAL_GL_EXTENSIONS);
|
||||
char *exts = strdup((char *)extensions);
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
static bool once = false;
|
||||
#else
|
||||
const bool once = true;
|
||||
@ -610,7 +610,7 @@ GLContext::InitExtensions()
|
||||
|
||||
free(exts);
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
once = true;
|
||||
#endif
|
||||
}
|
||||
@ -1459,7 +1459,7 @@ GLContext::ResizeOffscreenFBO(const gfxIntSize& aSize, const bool aUseReadFBO, c
|
||||
status = fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER);
|
||||
if (status != LOCAL_GL_FRAMEBUFFER_COMPLETE) {
|
||||
NS_WARNING("DrawFBO: Incomplete");
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
printf_stderr("Framebuffer status: %X\n", status);
|
||||
#endif
|
||||
framebuffersComplete = false;
|
||||
@ -1469,7 +1469,7 @@ GLContext::ResizeOffscreenFBO(const gfxIntSize& aSize, const bool aUseReadFBO, c
|
||||
status = fCheckFramebufferStatus(LOCAL_GL_FRAMEBUFFER);
|
||||
if (status != LOCAL_GL_FRAMEBUFFER_COMPLETE) {
|
||||
NS_WARNING("ReadFBO: Incomplete");
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
printf_stderr("Framebuffer status: %X\n", status);
|
||||
#endif
|
||||
framebuffersComplete = false;
|
||||
@ -1531,7 +1531,7 @@ GLContext::ResizeOffscreenFBO(const gfxIntSize& aSize, const bool aUseReadFBO, c
|
||||
|
||||
mActualFormat = cf;
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
if (DebugMode()) {
|
||||
printf_stderr("Resized %dx%d offscreen FBO: r: %d g: %d b: %d a: %d depth: %d stencil: %d samples: %d\n",
|
||||
mOffscreenActualSize.width, mOffscreenActualSize.height,
|
||||
@ -2719,7 +2719,7 @@ GLContext::SetBlitFramebufferForDestTexture(GLuint aTexture)
|
||||
}
|
||||
}
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
|
||||
void
|
||||
GLContext::CreatedProgram(GLContext *aOrigin, GLuint aName)
|
||||
|
@ -569,7 +569,7 @@ public:
|
||||
mOffscreenColorRB(0),
|
||||
mOffscreenDepthRB(0),
|
||||
mOffscreenStencilRB(0)
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
, mGLError(LOCAL_GL_NO_ERROR)
|
||||
#endif
|
||||
{
|
||||
@ -578,7 +578,7 @@ public:
|
||||
|
||||
virtual ~GLContext() {
|
||||
NS_ASSERTION(IsDestroyed(), "GLContext implementation must call MarkDestroyed in destructor!");
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
if (mSharedContext) {
|
||||
GLContext *tip = mSharedContext;
|
||||
while (tip->mSharedContext)
|
||||
@ -603,7 +603,7 @@ public:
|
||||
virtual bool MakeCurrentImpl(bool aForce = false) = 0;
|
||||
|
||||
bool MakeCurrent(bool aForce = false) {
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
sCurrentGLContext = this;
|
||||
#endif
|
||||
return MakeCurrentImpl(aForce);
|
||||
@ -933,7 +933,7 @@ public:
|
||||
}
|
||||
|
||||
GLuint GetBoundDrawFBO() {
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
GLint ret = 0;
|
||||
// Don't need a branch here, because:
|
||||
// LOCAL_GL_DRAW_FRAMEBUFFER_BINDING_EXT == LOCAL_GL_FRAMEBUFFER_BINDING == 0x8CA6
|
||||
@ -952,7 +952,7 @@ public:
|
||||
}
|
||||
|
||||
GLuint GetBoundReadFBO() {
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
GLint ret = 0;
|
||||
// We use raw_ here because this is debug code and we need to see what
|
||||
// the driver thinks.
|
||||
@ -1494,7 +1494,7 @@ public:
|
||||
static PRUint32 sDebugMode;
|
||||
|
||||
static PRUint32 DebugMode() {
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
return sDebugMode;
|
||||
#else
|
||||
return 0;
|
||||
@ -1508,7 +1508,7 @@ protected:
|
||||
|
||||
GLContextSymbols mSymbols;
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
// this should be thread-local, but that is slightly annoying to implement because on Mac
|
||||
// we don't have any __thread-like keyword. So for now, MOZ_GL_DEBUG assumes (and asserts)
|
||||
// that only the main thread is doing OpenGL calls.
|
||||
@ -1617,7 +1617,7 @@ public:
|
||||
return error;
|
||||
}
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
|
||||
#ifndef MOZ_FUNCTION_NAME
|
||||
# ifdef __GNUC__
|
||||
@ -1718,7 +1718,7 @@ public:
|
||||
/*** In GL debug mode, we completely override glGetError ***/
|
||||
|
||||
GLenum fGetError() {
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
// debug mode ends up eating the error in AFTER_GL_CALL
|
||||
if (DebugMode()) {
|
||||
GLenum err = mGLError;
|
||||
@ -2646,7 +2646,7 @@ public:
|
||||
}
|
||||
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
GLContext *TrackingContext() {
|
||||
GLContext *tip = this;
|
||||
while (tip->mSharedContext)
|
||||
@ -2756,7 +2756,7 @@ public:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
void THEBES_API CreatedProgram(GLContext *aOrigin, GLuint aName);
|
||||
void THEBES_API CreatedShader(GLContext *aOrigin, GLuint aName);
|
||||
void THEBES_API CreatedBuffers(GLContext *aOrigin, GLsizei aCount, GLuint *aNames);
|
||||
|
@ -252,7 +252,7 @@ is_power_of_two(int v)
|
||||
return (v & (v-1)) == 0;
|
||||
}
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
#undef BEFORE_GL_CALL
|
||||
#undef AFTER_GL_CALL
|
||||
|
||||
@ -997,7 +997,7 @@ public:
|
||||
// any EGL contexts will always be GLESv2
|
||||
SetIsGLES2(true);
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
printf_stderr("Initializing context %p surface %p on display %p\n", mContext, mSurface, EGL_DISPLAY());
|
||||
#endif
|
||||
}
|
||||
@ -1012,7 +1012,7 @@ public:
|
||||
if (mPlatformContext)
|
||||
return;
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
printf_stderr("Destroying context %p surface %p on display %p\n", mContext, mSurface, EGL_DISPLAY());
|
||||
#endif
|
||||
|
||||
@ -2216,7 +2216,7 @@ CreateSurfaceForWindow(nsIWidget *aWidget, EGLConfig config)
|
||||
{
|
||||
EGLSurface surface;
|
||||
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
sEGLLibrary.DumpEGLConfig(config);
|
||||
#endif
|
||||
|
||||
@ -2425,7 +2425,7 @@ TRY_ATTRIBS_AGAIN:
|
||||
// XXX do some smarter matching here, perhaps instead of the more complex
|
||||
// minimum overrides above
|
||||
config = configs[0];
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
sEGLLibrary.DumpEGLConfig(config);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user