b=593558; make gl context creation quieter; r=matt.woodrow; a=b

This commit is contained in:
Vladimir Vukicevic 2010-09-05 16:37:52 -04:00
parent 293ddefb00
commit d45fb468b2

View File

@ -342,7 +342,11 @@ GLContext::InitExtensions()
const GLubyte *extensions = fGetString(LOCAL_GL_EXTENSIONS);
char *exts = strdup((char *)extensions);
printf_stderr("GL extensions: %s\n", exts);
static bool once = false;
if (!once) {
printf_stderr("GL extensions: %s\n", exts);
}
char *s = exts;
bool done = false;
@ -356,7 +360,9 @@ GLContext::InitExtensions()
for (int i = 0; sExtensionNames[i]; ++i) {
if (strcmp(s, sExtensionNames[i]) == 0) {
printf_stderr("Found extension %s\n", s);
if (!once) {
printf_stderr("Found extension %s\n", s);
}
mAvailableExtensions[i] = 1;
}
}
@ -365,6 +371,8 @@ GLContext::InitExtensions()
}
free(exts);
once = true;
}
PRBool
@ -679,9 +687,11 @@ GLContext::ResizeOffscreenFBO(const gfxIntSize& aSize)
if (firstTime) {
UpdateActualFormat();
#ifdef DEBUG
printf_stderr("Created offscreen FBO: r: %d g: %d b: %d a: %d depth: %d stencil: %d\n",
mActualFormat.red, mActualFormat.green, mActualFormat.blue, mActualFormat.alpha,
mActualFormat.depth, mActualFormat.stencil);
#endif
}
// We're good, and the framebuffer is already attached, so let's
@ -1008,6 +1018,10 @@ RemoveNamesFromArray(GLContext *aOrigin, GLsizei aCount, GLuint *aNames, nsTArra
{
for (GLsizei j = 0; j < aCount; ++j) {
GLuint name = aNames[j];
// name 0 can be ignored
if (name == 0)
continue;
PRBool found = PR_FALSE;
for (PRUint32 i = 0; i < aArray.Length(); ++i) {
if (aArray[i].name == name) {
@ -1016,8 +1030,11 @@ RemoveNamesFromArray(GLContext *aOrigin, GLsizei aCount, GLuint *aNames, nsTArra
break;
}
}
if (!found)
printf_stderr("GL Context %p deleting resource %d, which doesn't exist!", aOrigin, name);
#ifdef DEBUG
if (!found) {
printf_stderr("GL Context %p deleting resource %d, which doesn't exist!\n", aOrigin, name);
}
#endif
}
}