diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-05-04 17:55:49 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-05-05 10:08:57 +0200 |
commit | c7e07cc736f33ccf751b326f7ae422682e428133 (patch) | |
tree | e80427f66d2e2a60d5a7333a89dfea2408aaeefa | |
parent | ef425f4e315d7afa79023d356cd05cc517d1f6b6 (diff) |
Skia has fast bitmap scaling too, if using Vulkan
This seems to only enable better sampling in Impress, but still.
Change-Id: I654e320a55982183ea0b935618badb3409b94316
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93434
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index b2976039f86d..c9942fc04f76 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -29,6 +29,9 @@ #if HAVE_FEATURE_OPENGL #include <vcl/opengl/OpenGLHelper.hxx> #endif +#if HAVE_FEATURE_SKIA +#include <vcl/skia/SkiaHelper.hxx> +#endif #include <vcl/BitmapMonochromeFilter.hxx> #include <BitmapScaleSuperFilter.hxx> @@ -777,12 +780,15 @@ bool Bitmap::Scale( const Size& rNewSize, BmpScaleFlag nScaleFlag ) bool Bitmap::HasFastScale() { -// TODO SKIA +#if HAVE_FEATURE_SKIA + if( SkiaHelper::isVCLSkiaEnabled() && SkiaHelper::renderMethodToUse() != SkiaHelper::RenderRaster) + return true; +#endif #if HAVE_FEATURE_OPENGL - return OpenGLHelper::isVCLOpenGLEnabled(); -#else - return false; + if( OpenGLHelper::isVCLOpenGLEnabled()) + return true; #endif + return false; } void Bitmap::AdaptBitCount(Bitmap& rNew) const |