summaryrefslogtreecommitdiff
path: root/vcl/unx
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 /vcl/unx
parente1e787d5e418a328f8023d3b777384b98441a9de (diff)
vcl: Use offscreen rendering for native GTK widgets with OpenGL backend
Change-Id: I142e1b34e54a3cbe149e5af9adeba1250a4ca9a9
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx6
1 files changed, 6 insertions, 0 deletions
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" );