summaryrefslogtreecommitdiff
path: root/vcl/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-06-29 15:07:39 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-06-30 08:04:06 +0200
commita3020001d1156c914e401ccc4c672ad0ebe4c8f8 (patch)
tree6849ecf4af1719ae91ebd9d098869b7c8002e14b /vcl/skia
parent0059392fc723deb53350878f7b92474ba2d49870 (diff)
actually call Skia init function
The SkGraphics::Init() docs say it's called by global variable initialization, but that doesn't seem to exist. Call it manually, as it decides e.g. which CPU features to use. Change-Id: I7e0e18290240ff2ae3298d5569c22f7dc083dde4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97415 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/skia')
-rw-r--r--vcl/skia/SkiaHelper.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/skia/SkiaHelper.cxx b/vcl/skia/SkiaHelper.cxx
index e31540ae449c..6b04c4300fe4 100644
--- a/vcl/skia/SkiaHelper.cxx
+++ b/vcl/skia/SkiaHelper.cxx
@@ -36,6 +36,7 @@ bool isVCLSkiaEnabled() { return false; }
#include <SkCanvas.h>
#include <SkPaint.h>
#include <SkSurface.h>
+#include <SkGraphics.h>
#include <skia_compiler.hxx>
#ifdef DBG_UTIL
@@ -237,6 +238,7 @@ bool isVCLSkiaEnabled()
if (bForceSkia && bSupportsVCLSkia)
{
bRet = true;
+ SkGraphics::Init();
// don't actually block if blacklisted, but log it if enabled, and also get the vendor id
checkDeviceBlacklisted(true);
}
@@ -260,7 +262,10 @@ bool isVCLSkiaEnabled()
bEnable = false;
if (bEnable)
+ {
+ SkGraphics::Init();
checkDeviceBlacklisted(); // switch to raster if driver is blacklisted
+ }
bRet = bEnable;
}