[Libreoffice-commits] core.git: Branch 'feature/fixes7' - include/vcl vcl/osx vcl/source vcl/unx vcl/win

2015-08-28 Thread László Németh
 include/vcl/opengl/OpenGLHelper.hxx |3 ---
 vcl/osx/salframe.cxx|5 -
 vcl/source/opengl/OpenGLHelper.cxx  |9 -
 vcl/unx/generic/window/salframe.cxx |3 ---
 vcl/unx/gtk/window/gtksalframe.cxx  |3 ---
 vcl/win/source/window/salframe.cxx  |3 ---
 6 files changed, 26 deletions(-)

New commits:
commit f762c8272fbbae81a1ec210b5d5f4b06788e1386
Author: László Németh laszlo.nem...@collabora.com
Date:   Fri Aug 28 11:46:31 2015 +0200

Revert tdf#93530 - the VCL GDI flushing abstraction should glFlush too.

This reverts commit b05e77d3a9ea0ad3f39239dba3abf7a303226bf9.

diff --git a/include/vcl/opengl/OpenGLHelper.hxx 
b/include/vcl/opengl/OpenGLHelper.hxx
index d14df0d..95c23c8 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -67,9 +67,6 @@ public:
  */
 static bool isVCLOpenGLEnabled();
 
-/// flush the OpenGL command queue - if OpenGL is enabled.
-static void flush();
-
 #if defined UNX  !defined MACOSX  !defined IOS  !defined ANDROID  
!defined(LIBO_HEADLESS)
 static bool GetVisualInfo(Display* pDisplay, int nScreen, XVisualInfo 
rVI);
 static GLXFBConfig GetPixmapFBConfig( Display* pDisplay, bool bInverted );
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 05957fc..251f5c3 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -27,7 +27,6 @@
 #include vcl/window.hxx
 #include vcl/syswin.hxx
 #include vcl/settings.hxx
-#include vcl/opengl/OpenGLHelper.hxx
 
 #include osx/saldata.hxx
 #include quartz/salgdi.h
@@ -38,7 +37,6 @@
 #include osx/a11yfactory.h
 #include quartz/utils.h
 
-
 #include salwtype.hxx
 
 #include premac.h
@@ -882,7 +880,6 @@ void AquaSalFrame::Flush()
 {
 [mpNSView display];
 }
-OpenGLHelper::flush();
 }
 
 void AquaSalFrame::Flush( const Rectangle rRect )
@@ -904,7 +901,6 @@ void AquaSalFrame::Flush( const Rectangle rRect )
 {
 [mpNSView display];
 }
-OpenGLHelper::flush();
 }
 
 void AquaSalFrame::Sync()
@@ -917,7 +913,6 @@ void AquaSalFrame::Sync()
 [mpNSView setNeedsDisplay: YES];
 [mpNSView display];
 }
-OpenGLHelper::flush();
 }
 
 void AquaSalFrame::SetInputContext( SalInputContext* pContext )
diff --git a/vcl/source/opengl/OpenGLHelper.cxx 
b/vcl/source/opengl/OpenGLHelper.cxx
index 5cde27c..967d4c5 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -608,13 +608,4 @@ GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* 
pDisplay, bool bInverted
 
 #endif
 
-void OpenGLHelper::flush()
-{
-if (!isVCLOpenGLEnabled())
-return;
-
-glFlush();
-CHECK_GL_ERROR();
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/window/salframe.cxx 
b/vcl/unx/generic/window/salframe.cxx
index 0cc6ee9..14e11d5 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -35,7 +35,6 @@
 #include vcl/settings.hxx
 #include vcl/bmpacc.hxx
 #include vcl/opengl/OpenGLContext.hxx
-#include vcl/opengl/OpenGLHelper.hxx
 
 #include prex.h
 #include X11/Xatom.h
@@ -2453,13 +2452,11 @@ void X11SalFrame::SetTitle( const OUString rTitle )
 void X11SalFrame::Flush()
 {
 XFlush( GetDisplay()-GetDisplay() );
-OpenGLHelper::flush();
 }
 
 void X11SalFrame::Sync()
 {
 XSync( GetDisplay()-GetDisplay(), False );
-OpenGLHelper::flush();
 }
 
 // Keyboard
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx 
b/vcl/unx/gtk/window/gtksalframe.cxx
index f31d800..7f8570e 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -37,7 +37,6 @@
 #include vcl/svapp.hxx
 #include vcl/window.hxx
 #include vcl/settings.hxx
-#include vcl/opengl/OpenGLHelper.hxx
 
 #if !GTK_CHECK_VERSION(3,0,0)
 #  include unx/x11/xlimits.hxx
@@ -2897,13 +2896,11 @@ void GtkSalFrame::Flush()
 #else
 XFlush (GDK_DISPLAY_XDISPLAY (getGdkDisplay()));
 #endif
-OpenGLHelper::flush();
 }
 
 void GtkSalFrame::Sync()
 {
 gdk_display_sync( getGdkDisplay() );
-OpenGLHelper::flush();
 }
 
 #ifndef GDK_Open
diff --git a/vcl/win/source/window/salframe.cxx 
b/vcl/win/source/window/salframe.cxx
index e97836e..f8e0b69 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -48,7 +48,6 @@
 #include vcl/window.hxx
 #include vcl/wrkwin.hxx
 #include vcl/svapp.hxx
-#include vcl/opengl/OpenGLHelper.hxx
 
 // Warning in SDK header
 #ifdef _MSC_VER
@@ -2207,13 +2206,11 @@ void WinSalFrame::SetPointerPos( long nX, long nY )
 void WinSalFrame::Flush()
 {
 GdiFlush();
-OpenGLHelper::flush();
 }
 
 void WinSalFrame::Sync()
 {
 GdiFlush();
-OpenGLHelper::flush();
 }
 
 static void ImplSalFrameSetInputContext( HWND hWnd, const SalInputContext* 
pContext )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

[Libreoffice-commits] core.git: Branch 'feature/fixes7' - include/vcl vcl/osx vcl/source vcl/unx vcl/win

2015-08-26 Thread Michael Meeks
 include/vcl/opengl/OpenGLHelper.hxx |3 +++
 vcl/osx/salframe.cxx|5 +
 vcl/source/opengl/OpenGLHelper.cxx  |9 +
 vcl/unx/generic/window/salframe.cxx |3 +++
 vcl/unx/gtk/window/gtksalframe.cxx  |3 +++
 vcl/win/source/window/salframe.cxx  |3 +++
 6 files changed, 26 insertions(+)

New commits:
commit b05e77d3a9ea0ad3f39239dba3abf7a303226bf9
Author: Michael Meeks michael.me...@collabora.com
Date:   Wed Aug 26 17:17:19 2015 +0100

tdf#93530 - the VCL GDI flushing abstraction should glFlush too.

Change-Id: I45cb0e62278d8c3154ae8ad54ca4c93b3e177969

diff --git a/include/vcl/opengl/OpenGLHelper.hxx 
b/include/vcl/opengl/OpenGLHelper.hxx
index 95c23c8..d14df0d 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -67,6 +67,9 @@ public:
  */
 static bool isVCLOpenGLEnabled();
 
+/// flush the OpenGL command queue - if OpenGL is enabled.
+static void flush();
+
 #if defined UNX  !defined MACOSX  !defined IOS  !defined ANDROID  
!defined(LIBO_HEADLESS)
 static bool GetVisualInfo(Display* pDisplay, int nScreen, XVisualInfo 
rVI);
 static GLXFBConfig GetPixmapFBConfig( Display* pDisplay, bool bInverted );
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 251f5c3..05957fc 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -27,6 +27,7 @@
 #include vcl/window.hxx
 #include vcl/syswin.hxx
 #include vcl/settings.hxx
+#include vcl/opengl/OpenGLHelper.hxx
 
 #include osx/saldata.hxx
 #include quartz/salgdi.h
@@ -37,6 +38,7 @@
 #include osx/a11yfactory.h
 #include quartz/utils.h
 
+
 #include salwtype.hxx
 
 #include premac.h
@@ -880,6 +882,7 @@ void AquaSalFrame::Flush()
 {
 [mpNSView display];
 }
+OpenGLHelper::flush();
 }
 
 void AquaSalFrame::Flush( const Rectangle rRect )
@@ -901,6 +904,7 @@ void AquaSalFrame::Flush( const Rectangle rRect )
 {
 [mpNSView display];
 }
+OpenGLHelper::flush();
 }
 
 void AquaSalFrame::Sync()
@@ -913,6 +917,7 @@ void AquaSalFrame::Sync()
 [mpNSView setNeedsDisplay: YES];
 [mpNSView display];
 }
+OpenGLHelper::flush();
 }
 
 void AquaSalFrame::SetInputContext( SalInputContext* pContext )
diff --git a/vcl/source/opengl/OpenGLHelper.cxx 
b/vcl/source/opengl/OpenGLHelper.cxx
index 967d4c5..5cde27c 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -608,4 +608,13 @@ GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* 
pDisplay, bool bInverted
 
 #endif
 
+void OpenGLHelper::flush()
+{
+if (!isVCLOpenGLEnabled())
+return;
+
+glFlush();
+CHECK_GL_ERROR();
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/window/salframe.cxx 
b/vcl/unx/generic/window/salframe.cxx
index 14e11d5..0cc6ee9 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -35,6 +35,7 @@
 #include vcl/settings.hxx
 #include vcl/bmpacc.hxx
 #include vcl/opengl/OpenGLContext.hxx
+#include vcl/opengl/OpenGLHelper.hxx
 
 #include prex.h
 #include X11/Xatom.h
@@ -2452,11 +2453,13 @@ void X11SalFrame::SetTitle( const OUString rTitle )
 void X11SalFrame::Flush()
 {
 XFlush( GetDisplay()-GetDisplay() );
+OpenGLHelper::flush();
 }
 
 void X11SalFrame::Sync()
 {
 XSync( GetDisplay()-GetDisplay(), False );
+OpenGLHelper::flush();
 }
 
 // Keyboard
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx 
b/vcl/unx/gtk/window/gtksalframe.cxx
index 7f8570e..f31d800 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -37,6 +37,7 @@
 #include vcl/svapp.hxx
 #include vcl/window.hxx
 #include vcl/settings.hxx
+#include vcl/opengl/OpenGLHelper.hxx
 
 #if !GTK_CHECK_VERSION(3,0,0)
 #  include unx/x11/xlimits.hxx
@@ -2896,11 +2897,13 @@ void GtkSalFrame::Flush()
 #else
 XFlush (GDK_DISPLAY_XDISPLAY (getGdkDisplay()));
 #endif
+OpenGLHelper::flush();
 }
 
 void GtkSalFrame::Sync()
 {
 gdk_display_sync( getGdkDisplay() );
+OpenGLHelper::flush();
 }
 
 #ifndef GDK_Open
diff --git a/vcl/win/source/window/salframe.cxx 
b/vcl/win/source/window/salframe.cxx
index f8e0b69..e97836e 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -48,6 +48,7 @@
 #include vcl/window.hxx
 #include vcl/wrkwin.hxx
 #include vcl/svapp.hxx
+#include vcl/opengl/OpenGLHelper.hxx
 
 // Warning in SDK header
 #ifdef _MSC_VER
@@ -2206,11 +2207,13 @@ void WinSalFrame::SetPointerPos( long nX, long nY )
 void WinSalFrame::Flush()
 {
 GdiFlush();
+OpenGLHelper::flush();
 }
 
 void WinSalFrame::Sync()
 {
 GdiFlush();
+OpenGLHelper::flush();
 }
 
 static void ImplSalFrameSetInputContext( HWND hWnd, const SalInputContext* 
pContext )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits