[Libreoffice-commits] core.git: vcl/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 5 08:09:32 UTC 2020
vcl/source/gdi/bitmap3.cxx | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit c7e07cc736f33ccf751b326f7ae422682e428133
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon May 4 17:55:49 2020 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Tue May 5 10:08:57 2020 +0200
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 at collabora.com>
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
More information about the Libreoffice-commits
mailing list