Kaydet (Commit) 8456753c authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Andras Timar

tdf#94252 - avoid switching contexts un-necessarily to reduce flicker.

Change-Id: Id4ac387174fa03c5886a990d89fd53a4f18db11c
Reviewed-on: https://gerrit.libreoffice.org/18610Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst 1a15c1cd
......@@ -77,8 +77,17 @@ bool OpenGLSalGraphicsImpl::AcquireContext( )
{
ImplSVData* pSVData = ImplGetSVData();
// We always prefer to bind our VirtualDevice / offscreen graphics
// to the current OpenGLContext - to avoid switching contexts.
if (mpContext.is() && mbOffscreen)
{
if (OpenGLContext::hasCurrent() && !mpContext->isCurrent())
mpContext.clear();
}
if( mpContext.is() )
{
// Check whether the context was reset underneath us.
if( mpContext->isInitialized() )
return true;
mpContext.clear();
......
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