vcl/source/opengl/OpenGLContext.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit 8cb5adc2c1ce42cda302b72ac145053bc906d7c6 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Fri Jun 12 02:45:54 2015 +0200 get rid of a few thousand unnecessary OpenGL calls For each iteration of the (gtk) main loop we are dropping the yield mutext which results in calling OpenGLContext::clearCurrent. That method calls OpenGLContext::ReleaseFramebuffers which would call in the end glBindFramebuffer for each framebuffer related to that context. This would easily grow into the thousand OpenGL calls without doing any work. Change-Id: I209cc534fe58a5e11ef7df7f850a787916b8bd43 Reviewed-on: https://gerrit.libreoffice.org/16241 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Reviewed-on: https://gerrit.libreoffice.org/18218 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 5c64448..d4c2a83 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -1633,8 +1633,11 @@ void OpenGLContext::ReleaseFramebuffers() OpenGLFramebuffer* pFramebuffer = mpLastFramebuffer; while( pFramebuffer ) { - BindFramebuffer( pFramebuffer ); - pFramebuffer->DetachTexture(); + if (!pFramebuffer->IsFree()) + { + BindFramebuffer( pFramebuffer ); + pFramebuffer->DetachTexture(); + } pFramebuffer = pFramebuffer->mpPrevFramebuffer; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits