summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-09-03 00:30:28 +0100
committerAndras Timar <andras.timar@collabora.com>2015-09-18 10:10:12 +0200
commitbd30cfde5e1a4f1062920f076b0bcbad51f523ab (patch)
tree8082c189bec8e082855e272459662f53a310d730 /canvas
parent6ad7ace039ac4233c3526e32b1bc487e08608aa5 (diff)
tdf#93870 - GL accel. via VCL canvas for presentations when GL enabled.
Change-Id: Ia31a88cb3d9e6baa987b22f77f407a3f592031f1 Reviewed-on: https://gerrit.libreoffice.org/18285 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/18295
Diffstat (limited to 'canvas')
-rw-r--r--canvas/Library_canvasfactory.mk1
-rw-r--r--canvas/source/cairo/cairo_canvas.cxx4
-rw-r--r--canvas/source/directx/dx_canvas.cxx4
-rw-r--r--canvas/source/factory/cf_service.cxx5
4 files changed, 14 insertions, 0 deletions
diff --git a/canvas/Library_canvasfactory.mk b/canvas/Library_canvasfactory.mk
index dec3175f0bbf..d3992fcc84d5 100644
--- a/canvas/Library_canvasfactory.mk
+++ b/canvas/Library_canvasfactory.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_Library_use_libraries,canvasfactory,\
cppu \
cppuhelper \
sal \
+ vcl \
$(gb_UWINAPI) \
))
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index e27daa2384eb..4d429df24d0b 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/lang/NoSupportException.hpp>
#include <toolkit/helper/vclunohelper.hxx>
+#include <vcl/opengl/OpenGLWrapper.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b2dpoint.hxx>
@@ -58,6 +59,9 @@ namespace cairocanvas
if( maArguments.getLength() == 0 )
return;
+ // tdf#93870 - force VCL canvas in OpenGL mode for now.
+ assert( !OpenGLWrapper::isVCLOpenGLEnabled() );
+
/* maArguments:
0: ptr to creating instance (Window or VirtualDevice)
1: SystemEnvData as a streamed Any (or empty for VirtualDevice)
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index 0cfb5420d0cb..d1aa77d2263c 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -37,6 +37,7 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implementationentry.hxx>
#include <comphelper/servicedecl.hxx>
+#include <vcl/opengl/OpenGLWrapper.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b2dpoint.hxx>
@@ -82,6 +83,9 @@ namespace dxcanvas
if( maArguments.getLength() == 0 )
return;
+ // tdf#93870 - force VCL canvas in OpenGL mode for now.
+ assert( !OpenGLWrapper::isVCLOpenGLEnabled() );
+
VERBOSE_TRACE( "Canvas::initialize called" );
// At index 1, we expect a HWND handle here, containing a
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index 427acb7948c4..64451299f437 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -40,6 +40,7 @@
#include <utility>
#include <o3tl/compat_functional.hxx>
#include <algorithm>
+#include <vcl/opengl/OpenGLWrapper.hxx>
using namespace ::com::sun::star;
@@ -310,6 +311,10 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
m_bCacheHasForcedLastImpl,
OUString("ForceSafeServiceImpl") );
+ // tdf#93870 - force VCL canvas in OpenGL mode for now.
+ if( OpenGLWrapper::isVCLOpenGLEnabled() )
+ bForceLastEntry = true;
+
// use anti-aliasing canvas, if config flag set (or not existing)
bool bUseAAEntry(true);
checkConfigFlag( bUseAAEntry,