canvas/source/cairo/cairo_canvas.cxx | 2 ++ canvas/source/directx/dx_canvas.cxx | 2 ++ canvas/source/factory/cf_service.cxx | 3 +++ canvas/source/vcl/spritehelper.cxx | 2 ++ cui/source/options/optgdlg.cxx | 13 +++++++++---- 5 files changed, 18 insertions(+), 4 deletions(-)
New commits: commit b4c28826e0f8716583e7663ca2ea7a25079f2583 Author: Luboš Luňák <[email protected]> AuthorDate: Mon Dec 9 15:47:22 2019 +0100 Commit: Luboš Luňák <[email protected]> CommitDate: Tue Dec 10 11:04:57 2019 +0100 force vclcanvas use with Skia, like it's with OpenGL (tdf#129076) Related to tdf#93870. Change-Id: Ie0cb64c05c0fde6a774ce8558d06943870e775fe Reviewed-on: https://gerrit.libreoffice.org/84758 Tested-by: Jenkins Reviewed-by: Luboš Luňák <[email protected]> diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx index b53f8bcb0bed..3f6dcaf3d2f9 100644 --- a/canvas/source/cairo/cairo_canvas.cxx +++ b/canvas/source/cairo/cairo_canvas.cxx @@ -26,6 +26,7 @@ #include <tools/diagnose_ex.h> #include <vcl/sysdata.hxx> #include <vcl/opengl/OpenGLWrapper.hxx> +#include <vcl/skia/SkiaHelper.hxx> #include "cairo_canvas.hxx" @@ -48,6 +49,7 @@ namespace cairocanvas // tdf#93870 - force VCL canvas in OpenGL mode for now. assert( !OpenGLWrapper::isVCLOpenGLEnabled() ); + assert( !SkiaHelper::isVCLSkiaEnabled() ); /* maArguments: 0: ptr to creating instance (Window or VirtualDevice) diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx index 28c73ed50e3c..39a319f31cff 100644 --- a/canvas/source/directx/dx_canvas.cxx +++ b/canvas/source/directx/dx_canvas.cxx @@ -37,6 +37,7 @@ #include <tools/diagnose_ex.h> #include <vcl/sysdata.hxx> #include <vcl/opengl/OpenGLWrapper.hxx> +#include <vcl/skia/SkiaHelper.hxx> #include <canvas/canvastools.hxx> @@ -85,6 +86,7 @@ namespace dxcanvas // tdf#93870 - force VCL canvas in OpenGL mode for now. assert( !OpenGLWrapper::isVCLOpenGLEnabled() ); + assert( !SkiaHelper::isVCLSkiaEnabled() ); SAL_INFO("canvas.directx", "Canvas::initialize called" ); diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx index 0bdacec7b4f7..86dbc2f12aeb 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -40,6 +40,7 @@ #if HAVE_FEATURE_OPENGL #include <vcl/opengl/OpenGLWrapper.hxx> #endif +#include <vcl/skia/SkiaHelper.hxx> #include <unotools/configmgr.hxx> using namespace ::com::sun::star; @@ -303,6 +304,8 @@ Reference<XInterface> CanvasFactory::lookupAndUse( if( OpenGLWrapper::isVCLOpenGLEnabled() ) bForceLastEntry = true; #endif + if( SkiaHelper::isVCLSkiaEnabled() ) + bForceLastEntry = true; // use anti-aliasing canvas, if config flag set (or not existing) bool bUseAAEntry(true); diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx index 0c721b95a484..29ec50b63ccf 100644 --- a/canvas/source/vcl/spritehelper.cxx +++ b/canvas/source/vcl/spritehelper.cxx @@ -33,6 +33,7 @@ #include <vcl/outdev.hxx> #include <vcl/BitmapMonochromeFilter.hxx> #include <vcl/opengl/OpenGLHelper.hxx> +#include <vcl/skia/SkiaHelper.hxx> #include <canvas/canvastools.hxx> #include <config_features.h> @@ -187,6 +188,7 @@ namespace vclcanvas #if HAVE_FEATURE_UI || OpenGLHelper::isVCLOpenGLEnabled() #endif + || SkiaHelper::isVCLSkiaEnabled() ) { // "complex" transformation, employ affine diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index ae9cf9961ad8..7a53fb886760 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -625,14 +625,19 @@ CanvasSettings::CanvasSettings() : bool CanvasSettings::IsHardwareAccelerationAvailable() const { + if (SkiaHelper::isVCLSkiaEnabled() && Application::GetToolkitName() != "gtk3") + { + mbHWAccelAvailable = false; + return false; + } #if HAVE_FEATURE_OPENGL -// TODO SKIA if (OpenGLWrapper::isVCLOpenGLEnabled() && Application::GetToolkitName() != "gtk3") + { mbHWAccelAvailable = false; - - else + return false; + } #endif - if( !mbHWAccelChecked ) + if( !mbHWAccelChecked ) { mbHWAccelChecked = true; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
