[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl' - 3 commits - vcl/inc vcl/source vcl/win

Jan Holesovsky kendy at collabora.com
Fri Nov 7 09:16:18 PST 2014


 vcl/inc/win/salgdi.h                |    2 +-
 vcl/source/opengl/OpenGLContext.cxx |    5 +++++
 vcl/win/source/gdi/salgdi.cxx       |    6 +++++-
 3 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit a865aafc30607dcbe2f824a2415f0aae55e7375e
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Nov 7 18:04:37 2014 +0100

    windows opengl: Make SwapBuffers() actually do something.
    
    Change-Id: If58e9eaccd4850d33302ced5e83f649415158e24

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index aadd971..f09af28 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -397,7 +397,7 @@ public:
     virtual SystemGraphicsData GetGraphicsData() const;
     virtual SystemFontData     GetSysFontData( int nFallbacklevel ) const;
 
-    virtual bool               SwapBuffers() SAL_OVERRIDE { return false; };
+    virtual bool               SwapBuffers() SAL_OVERRIDE;
 
     /// Update settings based on the platform values
     static void updateSettingsNative( AllSettings& rSettings );
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 138775a..f185955 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -1029,4 +1029,9 @@ SystemGraphicsData WinSalGraphics::GetGraphicsData() const
     return aRes;
 }
 
+bool WinSalGraphics::SwapBuffers()
+{
+    return mpImpl->swapBuffers();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 4d0510f802d1a56e654e34f5c3414081ec8deda9
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Nov 7 18:01:54 2014 +0100

    windows opengl: Don't construct WinSalGraphicsImpl just to destroy it again.
    
    Change-Id: I61afb35503a3947aa21bd90224e2f8614033a384

diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 17074a8..138775a 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -567,7 +567,6 @@ void ImplClearHDCCache( SalData* pData )
 }
 
 WinSalGraphics::WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hWnd):
-    mpImpl(new WinSalGraphicsImpl(*this)),
     mhLocalDC(0),
     mbPrinter(eType == WinSalGraphics::PRINTER),
     mbVirDev(eType == WinSalGraphics::VIRTUAL_DEVICE),
commit 745ba7b00347ede698cfb007b35adb191c11f31f
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Nov 7 17:56:35 2014 +0100

    windows opengl: Setup the OpenGL window size also on Windows.
    
    Change-Id: I5020cfb86e02ac331cb8922397e8be4f7d68d15e

diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 521c4f2..b5a1898 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -677,6 +677,11 @@ bool OpenGLContext::ImplInit()
         return false;
     }
 
+    RECT clientRect;
+    GetClientRect(WindowFromDC(m_aGLWin.hDC), &clientRect);
+    m_aGLWin.Width = clientRect.right - clientRect.left;
+    m_aGLWin.Height = clientRect.bottom - clientRect.top;
+
 #elif defined( MACOSX )
 
     NSOpenGLView* pView = getOpenGLView();


More information about the Libreoffice-commits mailing list