[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl' - vcl/Library_vclplug_gtk.mk vcl/unx

Louis-Francis Ratté-Boulianne lfrb at collabora.com
Tue Nov 11 13:17:36 PST 2014


 vcl/Library_vclplug_gtk.mk               |    1 +
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |    6 ++++++
 2 files changed, 7 insertions(+)

New commits:
commit a91f26a04c4cbcfea28fa2b120338a54a558dcdc
Author: Louis-Francis Ratté-Boulianne <lfrb at collabora.com>
Date:   Tue Nov 11 16:16:57 2014 -0500

    vcl: Use offscreen rendering for native GTK widgets with OpenGL backend
    
    Change-Id: I142e1b34e54a3cbe149e5af9adeba1250a4ca9a9

diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk
index db2dd21..ec7f2f8 100644
--- a/vcl/Library_vclplug_gtk.mk
+++ b/vcl/Library_vclplug_gtk.mk
@@ -65,6 +65,7 @@ $(eval $(call gb_Library_use_externals,vclplug_gtk,\
 	cairo \
 	dbus \
 	gio \
+	glew \
 	gtk \
 	gthread \
 	icuuc \
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 0cf68fd..2473297 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -41,6 +41,8 @@
 #include "fontmanager.hxx"
 #include <vcl/decoview.hxx>
 
+#include <vcl/opengl/OpenGLHelper.hxx>
+
 typedef struct _cairo_font_options cairo_font_options_t;
 const char* const tabPrelitDataName="libreoffice-tab-is-prelit";
 
@@ -533,6 +535,10 @@ void GtkData::initNWF( void )
     if( pEnv && *pEnv )
         GtkSalGraphics::bNeedPixmapPaint = true;
 
+    // use offscreen rendering when using OpenGL backend
+    if( OpenGLHelper::isVCLOpenGLEnabled() )
+        GtkSalGraphics::bNeedPixmapPaint = true;
+
     #if OSL_DEBUG_LEVEL > 1
     std::fprintf( stderr, "GtkPlugin: using %s NWF\n",
              GtkSalGraphics::bNeedPixmapPaint ? "offscreen" : "direct" );


More information about the Libreoffice-commits mailing list