Kaydet (Commit) 8cb5adc2 authored tarafından Markus Mohrhard's avatar Markus Mohrhard Kaydeden (comit) Jan Holesovsky

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/16241Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-on: https://gerrit.libreoffice.org/18218Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst d12f8f49
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment