summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-06-29 15:07:39 +0200
committerCaolán McNamara <caolanm@redhat.com>2020-07-02 13:00:32 +0200
commitd4610eb0c9164bee85da1e6f2b673cb205892f3f (patch)
treef2aa599cdedf4e4c9c978dac250bcb11c85d7eb0 /vcl
parent08278332e3b39fc968a6a7ef603f39cbca108d4e (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> (cherry picked from commit 080731f27e818a6461f89ada62d2a903c569c35f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97491 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-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;
}