diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index 6a6195dce4..dbe9dc0c2d 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -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; } diff --git a/effects/logout/logout.cpp b/effects/logout/logout.cpp index 4f7e1a041c..74103babed 100644 --- a/effects/logout/logout.cpp +++ b/effects/logout/logout.cpp @@ -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) diff --git a/egl_wayland_backend.cpp b/egl_wayland_backend.cpp index 489f03f142..9dc4e8287b 100644 --- a/egl_wayland_backend.cpp +++ b/egl_wayland_backend.cpp @@ -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; } diff --git a/eglonxbackend.cpp b/eglonxbackend.cpp index 745eb4eae5..2a3a5e65e1 100644 --- a/eglonxbackend.cpp +++ b/eglonxbackend.cpp @@ -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(); diff --git a/glxbackend.cpp b/glxbackend.cpp index 9fd178e569..677520bac1 100644 --- a/glxbackend.cpp +++ b/glxbackend.cpp @@ -120,7 +120,6 @@ GlxBackend::~GlxBackend() // TODO: cleanup in error case // do cleanup after initBuffer() cleanupGL(); - checkGLError("Cleanup"); doneCurrent(); if (ctx) diff --git a/libkwineffects/kwinglcolorcorrection.cpp b/libkwineffects/kwinglcolorcorrection.cpp index f8c24f6344..97382746c8 100644 --- a/libkwineffects/kwinglcolorcorrection.cpp +++ b/libkwineffects/kwinglcolorcorrection.cpp @@ -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) diff --git a/libkwineffects/kwinglcolorcorrection_p.h b/libkwineffects/kwinglcolorcorrection_p.h index 0273ca5474..59a0c311a2 100644 --- a/libkwineffects/kwinglcolorcorrection_p.h +++ b/libkwineffects/kwinglcolorcorrection_p.h @@ -82,7 +82,7 @@ public: virtual ~ColorCorrectionPrivate(); bool setupCCTextures(); - bool deleteCCTextures(); + void deleteCCTextures(); static bool setupCCTexture(GLuint texture, const Clut &clut); public Q_SLOTS: diff --git a/libkwineffects/kwingltexture.cpp b/libkwineffects/kwingltexture.cpp index 6791fd0676..1cf7f9a70f 100644 --- a/libkwineffects/kwingltexture.cpp +++ b/libkwineffects/kwingltexture.cpp @@ -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) { diff --git a/scene_opengl.cpp b/scene_opengl.cpp index b1ba46c9e1..b14bfe311d 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -57,10 +57,6 @@ along with this program. If not, see . #include #include -// 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 #include #include @@ -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(); }