[Libreoffice-commits] core.git: vcl/opengl vcl/win

Michael Meeks michael.meeks at collabora.com
Wed Sep 16 02:14:16 PDT 2015


 vcl/opengl/win/gdiimpl.cxx         |    1 +
 vcl/win/source/window/salframe.cxx |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4af40495b7dcdac3add67c634dde75c896e370d9
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Wed Sep 16 09:13:11 2015 +0100

    tdf#94213 - cleanup associated GL contexts properly when DCs released.
    
    Change-Id: I6b9fb899777d8e460999ac3ff038a1302e434bb5
    Reviewed-on: https://gerrit.libreoffice.org/18605
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index 3ba2694..517cff1 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -57,6 +57,7 @@ void WinOpenGLSalGraphicsImpl::Init()
         // SalGraphics which share the same hWnd and hDC.
         // The shape 'Area' dialog does reparenting to trigger this.
         SAL_WARN("vcl.opengl", "Unusual: Windows handle / DC changed without DeInit");
+        DeInit();
     }
 
     OpenGLSalGraphicsImpl::Init();
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index d2bb240..5cb863f 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -1046,7 +1046,7 @@ void WinSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
             SalData* pSalData = GetSalData();
             if ( mpGraphics2->getDefPal() )
                 SelectPalette( mpGraphics2->getHDC(), mpGraphics2->getDefPal(), TRUE );
-            mpGraphics2->InitGraphics();
+            mpGraphics2->DeInitGraphics();
             SendMessageW( pSalData->mpFirstInstance->mhComWnd,
                              SAL_MSG_RELEASEDC,
                              (WPARAM)mhWnd,


More information about the Libreoffice-commits mailing list