[Libreoffice-commits] core.git: vcl/source

Tor Lillqvist tml at collabora.com
Fri Sep 4 06:59:36 PDT 2015


 vcl/source/opengl/OpenGLContext.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 091723f7fd012cb3b6896c5559c5f235bbaec513
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Sep 4 16:44:25 2015 +0300

    Avoid a SAL_INFO about OpenGL when not using OpenGL
    
    Change-Id: Ia066c240776cecc855b59ab0ccc84e7fdcbf4b79

diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 3c305d5..b1212fd 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1340,11 +1340,16 @@ void OpenGLContext::prepareForYield()
 {
     ImplSVData* pSVData = ImplGetSVData();
 
-    SAL_INFO("vcl.opengl", "Unbinding contexts in preparation for yield");
     // release all framebuffers from the old context so we can re-attach the
     // texture in the new context
     OpenGLContext* pCurrentCtx = pSVData->maGDIData.mpLastContext;
-    if( pCurrentCtx && pCurrentCtx->isCurrent() )
+
+    if ( !pCurrentCtx )
+        return;                 // Not using OpenGL
+
+    SAL_INFO("vcl.opengl", "Unbinding contexts in preparation for yield");
+
+    if( pCurrentCtx->isCurrent() )
         pCurrentCtx->resetCurrent();
 
     assert (!hasCurrent());


More information about the Libreoffice-commits mailing list