From 055f76b8f1897b79cc5f153da55e38b95ca551a2 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 3 Sep 2015 00:30:28 +0100 Subject: 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 Reviewed-by: Michael Meeks Tested-by: Michael Meeks Reviewed-by: Jan Holesovsky --- canvas/Library_canvasfactory.mk | 1 + canvas/source/cairo/cairo_canvas.cxx | 4 ++++ canvas/source/directx/dx_canvas.cxx | 4 ++++ canvas/source/factory/cf_service.cxx | 5 +++++ 4 files changed, 14 insertions(+) (limited to 'canvas') 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 6b46438f58a7..589d585121ba 100644 --- a/canvas/source/cairo/cairo_canvas.cxx +++ b/canvas/source/cairo/cairo_canvas.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -54,6 +55,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 f8578317d762..f9e6ee1fa526 100644 --- a/canvas/source/directx/dx_canvas.cxx +++ b/canvas/source/directx/dx_canvas.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include @@ -78,6 +79,9 @@ namespace dxcanvas if( maArguments.getLength() == 0 ) return; + // tdf#93870 - force VCL canvas in OpenGL mode for now. + assert( !OpenGLWrapper::isVCLOpenGLEnabled() ); + SAL_INFO("canvas.directx", "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 3a8130d4409f..bc8853800bc1 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -39,6 +39,7 @@ #include #include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -308,6 +309,10 @@ Reference 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, -- cgit