summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx')
-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" );