[Libreoffice-commits] core.git: vcl/inc vcl/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 1 14:57:11 UTC 2021
vcl/inc/skia/win/gdiimpl.hxx | 10 +++++-----
vcl/inc/skia/x11/textrender.hxx | 2 +-
vcl/skia/win/gdiimpl.cxx | 2 ++
3 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 9cd95b10936450b5d1d60319192c25c4aea05fa3
Author: Luboš Luňák <l.lunak at centrum.cz>
AuthorDate: Wed Feb 24 12:45:32 2021 +0000
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Mar 1 15:56:25 2021 +0100
it's enough to have one Skia font manager
Change-Id: I5dd29178e1a1ec1081820912f49fd387eb3f822b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111521
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/vcl/inc/skia/win/gdiimpl.hxx b/vcl/inc/skia/win/gdiimpl.hxx
index fd39ca273609..277c076323c8 100644
--- a/vcl/inc/skia/win/gdiimpl.hxx
+++ b/vcl/inc/skia/win/gdiimpl.hxx
@@ -21,9 +21,9 @@
#include <svdata.hxx>
#include <SkFont.h>
+#include <SkFontMgr.h>
class SkTypeface;
-class SkFontMgr;
class ControlCacheKey;
class SkiaCompatibleDC : public CompatibleDC
@@ -63,10 +63,10 @@ protected:
virtual void performFlush() override;
sk_sp<SkTypeface> createDirectWriteTypeface(const LOGFONTW& logFont);
static void initFontInfo();
- IDWriteFactory* dwriteFactory;
- IDWriteGdiInterop* dwriteGdiInterop;
- sk_sp<SkFontMgr> dwriteFontMgr;
- bool dwriteDone = false;
+ inline static IDWriteFactory* dwriteFactory;
+ inline static IDWriteGdiInterop* dwriteGdiInterop;
+ inline static sk_sp<SkFontMgr> dwriteFontMgr;
+ inline static bool dwriteDone = false;
static SkFont::Edging fontEdging;
};
diff --git a/vcl/inc/skia/x11/textrender.hxx b/vcl/inc/skia/x11/textrender.hxx
index d6eda9a048ea..6943ab4ce416 100644
--- a/vcl/inc/skia/x11/textrender.hxx
+++ b/vcl/inc/skia/x11/textrender.hxx
@@ -32,7 +32,7 @@ public:
virtual void ClearDevFontCache() override;
private:
- sk_sp<SkFontMgr> fontManager;
+ static inline sk_sp<SkFontMgr> fontManager;
};
#endif
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index 8467b1d80765..6d47f34ed84d 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -159,6 +159,8 @@ sk_sp<SkTypeface> WinSkiaSalGraphicsImpl::createDirectWriteTypeface(const LOGFON
}
dwriteDone = true;
}
+ if (!dwriteFontMgr)
+ return nullptr;
IDWriteFont* font = nullptr;
IDWriteFontFace* fontFace;
IDWriteFontFamily* fontFamily;
More information about the Libreoffice-commits
mailing list