[Libreoffice-commits] core.git: canvas/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 7 14:20:53 UTC 2020
canvas/source/factory/cf_service.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit cc6941e8ce4a22cd7bdcdf1db72da02546b35fd2
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Oct 5 20:42:49 2020 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Wed Oct 7 16:20:17 2020 +0200
better way of ensuring Skia is used only with canvas that work
Most canvas implementations fall flat on their face when used
with Skia for various reasons, such as assuming presence of cairo
canvas or GDI bitmaps. I kind of already blocked them
in b4c28826e0f8716583e7663ca2ea7a2, when I just copy&pasted
the OpenGL case. That just selects the last implementation,
which in reality appears to be always vclcanvas, which is probably
just luck. Also this wouldn't work with more than one possible
canvas implementation for Skia.
Change-Id: If644abbaeed72f1a649f8974d00f564131aa9329
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103784
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Jenkins
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index 874b1ffe68bf..9bb75d5e26b0 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -304,8 +304,6 @@ 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);
@@ -379,10 +377,14 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
if (bForceLastEntry && pCurrImpl != pEndImpl)
pCurrImpl = pEndImpl-1;
- while( pCurrImpl != pEndImpl )
+ for(; pCurrImpl != pEndImpl; ++pCurrImpl)
{
const OUString aCurrName(pCurrImpl->trim());
+ // Skia works only with vclcanvas.
+ if( SkiaHelper::isVCLSkiaEnabled() && !aCurrName.endsWith(".VCL"))
+ continue;
+
// check whether given canvas service is listed in the
// sequence of "accelerated canvas implementations"
const bool bIsAcceleratedImpl(
@@ -426,8 +428,6 @@ Reference<XInterface> CanvasFactory::lookupAndUse(
return xCanvas;
}
}
-
- ++pCurrImpl;
}
return Reference<XInterface>();
More information about the Libreoffice-commits
mailing list