summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-11-11 16:16:57 -0500
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-11-12 04:07:41 +0100
commitb49bea154047efeb9e487dde6c9742cf31c11400 (patch)
treeb200eb43aed994c72b4463bb8874d31ba2885722
parente1e787d5e418a328f8023d3b777384b98441a9de (diff)
vcl: Use offscreen rendering for native GTK widgets with OpenGL backend
Change-Id: I142e1b34e54a3cbe149e5af9adeba1250a4ca9a9
-rw-r--r--vcl/Library_vclplug_gtk.mk1
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/vcl/Library_vclplug_gtk.mk b/vcl/Library_vclplug_gtk.mk
index db2dd21c3eb8..ec7f2f8ec805 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 0cf68fdecb18..24732979b94e 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" );