Remove most calls to checkGLError()

...and rely on KHR_debug/GL_ARB_debug_output instead.
This commit is contained in:
Fredrik Höglund 2014-11-19 19:02:57 +01:00
parent c0deadfaad
commit 6ac7371113
9 changed files with 3 additions and 28 deletions

View file

@ -376,7 +376,6 @@ bool CubeEffect::loadShader()
sphereShader->setUniform("width", (float)rect.width() * 0.5f);
sphereShader->setUniform("height", (float)rect.height() * 0.5f);
sphereShader->setUniform("u_offset", QVector2D(0, 0));
checkGLError("Loading Sphere Shader");
}
return true;
}

View file

@ -360,7 +360,6 @@ void LogoutEffect::renderBlurTexture()
blurTexture->render(infiniteRegion(), effects->virtualScreenGeometry());
blurTexture->unbind();
glDisable(GL_BLEND);
checkGLError("Render blur texture");
}
void LogoutEffect::slotPropertyNotify(EffectWindow* w, long a)

View file

@ -65,7 +65,6 @@ EglWaylandBackend::EglWaylandBackend()
EglWaylandBackend::~EglWaylandBackend()
{
cleanupGL();
checkGLError("Cleanup");
doneCurrent();
eglDestroyContext(m_display, m_context);
eglDestroySurface(m_display, m_surface);
@ -433,7 +432,6 @@ bool EglWaylandTexture::loadTexture(xcb_pixmap_t pix, const QSize &size, xcb_vis
#endif
q->unbind();
checkGLError("load texture");
q->setYInverted(true);
m_size = size;
updateMatrix();
@ -470,7 +468,6 @@ bool EglWaylandTexture::update(const QRegion &damage)
#endif
q->unbind();
checkGLError("update texture");
return true;
}

View file

@ -53,7 +53,6 @@ EglOnXBackend::~EglOnXBackend()
m_overlayWindow->destroy();
}
cleanupGL();
checkGLError("Cleanup");
doneCurrent();
eglDestroyContext(dpy, ctx);
eglDestroySurface(dpy, surface);
@ -523,7 +522,6 @@ bool EglTexture::loadTexture(xcb_pixmap_t pix, const QSize &size, xcb_visualid_t
}
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, (GLeglImageOES)m_image);
q->unbind();
checkGLError("load texture");
q->setYInverted(true);
m_size = size;
updateMatrix();

View file

@ -120,7 +120,6 @@ GlxBackend::~GlxBackend()
// TODO: cleanup in error case
// do cleanup after initBuffer()
cleanupGL();
checkGLError("Cleanup");
doneCurrent();
if (ctx)

View file

@ -590,11 +590,8 @@ bool ColorCorrectionPrivate::setupCCTextures()
return success;
}
bool ColorCorrectionPrivate::deleteCCTextures()
void ColorCorrectionPrivate::deleteCCTextures()
{
// Clear any previous GL errors
checkGLError("deleteCCTextures-clearErrors");
// Delete dummy texture
if (m_dummyCCTexture) {
glDeleteTextures(1, &m_dummyCCTexture);
@ -606,8 +603,6 @@ bool ColorCorrectionPrivate::deleteCCTextures()
glDeleteTextures(m_outputCCTextures.size(), m_outputCCTextures.data());
m_outputCCTextures.clear();
}
return !checkGLError("deleteCCTextures");
}
bool ColorCorrectionPrivate::setupCCTexture(GLuint texture, const Clut& clut)

View file

@ -82,7 +82,7 @@ public:
virtual ~ColorCorrectionPrivate();
bool setupCCTextures();
bool deleteCCTextures();
void deleteCCTextures();
static bool setupCCTexture(GLuint texture, const Clut &clut);
public Q_SLOTS:

View file

@ -263,7 +263,7 @@ void GLTexture::update(const QImage &image, const QPoint &offset, const QRect &s
bind();
glTexSubImage2D(d->m_target, 0, offset.x(), offset.y(), width, height,
GLTexturePrivate::s_textureFormat, GL_UNSIGNED_BYTE, img.bits());
checkGLError("update texture");
unbind();
setDirty();
if (!src.isNull() && d->s_supportsUnpack) {

View file

@ -57,10 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <unistd.h>
#include <stddef.h>
// turns on checks for opengl errors in various places (for easier finding of them)
// normally only few of them are enabled
//#define CHECK_GL_ERROR
#include <qpainter.h>
#include <QDBusConnection>
#include <QDBusConnectionInterface>
@ -642,9 +638,6 @@ qint64 SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
}
int mask = 0;
#ifdef CHECK_GL_ERROR
checkGLError("Paint1");
#endif
// After this call, updateRegion will contain the damaged region in the
// back buffer. This is the region that needs to be posted to repair
@ -668,10 +661,6 @@ qint64 SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
}
#endif
#ifdef CHECK_GL_ERROR
checkGLError("Paint2");
#endif
m_backend->endRenderingFrame(validRegion, updateRegion);
if (m_currentFence) {
@ -686,7 +675,6 @@ qint64 SceneOpenGL::paint(QRegion damage, ToplevelList toplevels)
// do cleanup
clearStackingOrder();
checkGLError("PostPaint");
return m_backend->renderTime();
}