summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2019-11-18 13:56:55 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2019-11-19 03:14:45 +0100
commit852a0f9cd88ef1f646af67e59a0fdd779b0e7627 (patch)
tree48dc90a99620311e826b25a625f2b9ce15be571b
parentf8e1f8652255cadd80a991aa3e059ee631b333b8 (diff)
Rename GlyphCache to FreetypeManager
And while at it remove the unneeded getPlatformGlyphCache abstraction. Change-Id: Id5cad751eda9e6bf177dfb4816280d7c5af7066a Reviewed-on: https://gerrit.libreoffice.org/83125 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r--compilerplugins/clang/unnecessaryvirtual.results2
-rw-r--r--compilerplugins/clang/unusedmethods.results2
-rw-r--r--vcl/headless/svpcairotextrender.cxx5
-rw-r--r--vcl/headless/svpgdi.cxx7
-rw-r--r--vcl/inc/headless/svpcairotextrender.hxx1
-rw-r--r--vcl/inc/headless/svpgdi.hxx2
-rw-r--r--vcl/inc/impfontcache.hxx18
-rw-r--r--vcl/inc/unx/cairotextrender.hxx2
-rw-r--r--vcl/inc/unx/freetype_glyphcache.hxx4
-rw-r--r--vcl/inc/unx/gendata.hxx18
-rw-r--r--vcl/inc/unx/genpspgraphics.h4
-rw-r--r--vcl/inc/unx/glyphcache.hxx21
-rw-r--r--vcl/ios/dummies.cxx4
-rw-r--r--vcl/qt5/Qt5Data.cxx2
-rw-r--r--vcl/qt5/Qt5Graphics_Text.cxx8
-rw-r--r--vcl/source/font/fontcache.cxx4
-rw-r--r--vcl/unx/generic/app/gendata.cxx4
-rw-r--r--vcl/unx/generic/app/saldisp.cxx2
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx31
-rw-r--r--vcl/unx/generic/gdi/x11cairotextrender.cxx5
-rw-r--r--vcl/unx/generic/gdi/x11cairotextrender.hxx1
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx8
-rw-r--r--vcl/unx/generic/glyphs/glyphcache.cxx30
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx22
-rw-r--r--vcl/workben/docxfuzzer.cxx2
-rw-r--r--vcl/workben/fodpfuzzer.cxx2
-rw-r--r--vcl/workben/fodsfuzzer.cxx2
-rw-r--r--vcl/workben/fodtfuzzer.cxx2
-rw-r--r--vcl/workben/htmlfuzzer.cxx2
-rw-r--r--vcl/workben/mmlfuzzer.cxx2
-rw-r--r--vcl/workben/pptfuzzer.cxx2
-rw-r--r--vcl/workben/pptxfuzzer.cxx2
-rw-r--r--vcl/workben/rtffuzzer.cxx2
-rw-r--r--vcl/workben/scrtffuzzer.cxx2
-rw-r--r--vcl/workben/wksfuzzer.cxx2
-rw-r--r--vcl/workben/wmffuzzer.cxx2
-rw-r--r--vcl/workben/ww2fuzzer.cxx2
-rw-r--r--vcl/workben/ww6fuzzer.cxx2
-rw-r--r--vcl/workben/ww8fuzzer.cxx2
-rw-r--r--vcl/workben/xlsfuzzer.cxx2
-rw-r--r--vcl/workben/xlsxfuzzer.cxx2
41 files changed, 108 insertions, 133 deletions
diff --git a/compilerplugins/clang/unnecessaryvirtual.results b/compilerplugins/clang/unnecessaryvirtual.results
index fba7f09695cb..c2ba2ddd41eb 100644
--- a/compilerplugins/clang/unnecessaryvirtual.results
+++ b/compilerplugins/clang/unnecessaryvirtual.results
@@ -239,7 +239,7 @@ vcl/inc/salobj.hxx:49
vcl/inc/salprn.hxx:116
enum SalPrinterError SalPrinter::GetErrorCode()
vcl/inc/unx/glyphcache.hxx:54
- void GlyphCache::~GlyphCache()
+ void FreetypeManager::~FreetypeManager()
vcl/inc/unx/gtk/gtkdata.hxx:136
int GtkSalDisplay::CaptureMouse(class SalFrame *,)
vcl/inc/unx/saldata.hxx:51
diff --git a/compilerplugins/clang/unusedmethods.results b/compilerplugins/clang/unusedmethods.results
index 6f41c1d5b301..4d584a158ba6 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -1439,7 +1439,7 @@ vcl/inc/schedulerimpl.hxx:38
vcl/inc/svimpbox.hxx:340
void SvImpLBox::EnableCellFocus()
vcl/inc/unx/glyphcache.hxx:68
- void GlyphCache::ClearFontOptions()
+ void FreetypeManager::ClearFontOptions()
vcl/inc/unx/gtk/gtkframe.hxx:214
void ensure_dbus_setup(struct _GdkWindow *,class GtkSalFrame *)
vcl/inc/unx/saldisp.hxx:378
diff --git a/vcl/headless/svpcairotextrender.cxx b/vcl/headless/svpcairotextrender.cxx
index ca688d96aa81..de62b9e5064c 100644
--- a/vcl/headless/svpcairotextrender.cxx
+++ b/vcl/headless/svpcairotextrender.cxx
@@ -16,11 +16,6 @@ SvpCairoTextRender::SvpCairoTextRender(SvpSalGraphics& rParent)
{
}
-GlyphCache& SvpCairoTextRender::getPlatformGlyphCache()
-{
- return SvpSalGraphics::getPlatformGlyphCache();
-}
-
cairo_t* SvpCairoTextRender::getCairoContext()
{
return mrParent.getCairoContext(false);
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index e34678a93932..eab7ab4b0456 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -2159,13 +2159,6 @@ bool SvpSalGraphics::supportsOperation(OutDevSupportType eType) const
return false;
}
-GlyphCache& SvpSalGraphics::getPlatformGlyphCache()
-{
- GenericUnixSalData* const pSalData(GetGenericUnixSalData());
- assert(pSalData);
- return *pSalData->GetGlyphCache();
-}
-
void dl_cairo_surface_set_device_scale(cairo_surface_t *surface, double x_scale, double y_scale)
{
static auto func = reinterpret_cast<void(*)(cairo_surface_t*, double, double)>(
diff --git a/vcl/inc/headless/svpcairotextrender.hxx b/vcl/inc/headless/svpcairotextrender.hxx
index 1dfe61124e93..bbe0962faa3d 100644
--- a/vcl/inc/headless/svpcairotextrender.hxx
+++ b/vcl/inc/headless/svpcairotextrender.hxx
@@ -21,7 +21,6 @@ class SvpCairoTextRender : public CairoTextRender
public:
explicit SvpCairoTextRender(SvpSalGraphics& rParent);
- virtual GlyphCache& getPlatformGlyphCache() override;
virtual cairo_t* getCairoContext() override;
virtual void getSurfaceOffset(double& nDX, double& nDY) override;
virtual void clipRegion(cairo_t* cr) override;
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index d06c138a0284..5dc136f6058c 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -64,7 +64,6 @@
#endif
struct BitmapBuffer;
-class GlyphCache;
class FreetypeFont;
typedef struct _cairo cairo_t;
typedef struct _cairo_surface cairo_surface_t;
@@ -95,7 +94,6 @@ class VCL_DLLPUBLIC SvpSalGraphics : public SalGraphics
PaintMode m_ePaintMode;
public:
- static GlyphCache& getPlatformGlyphCache();
void setSurface(cairo_surface_t* pSurface, const basegfx::B2IVector& rSize);
cairo_surface_t* getSurface() const { return m_pSurface; }
static cairo_user_data_key_t* getDamageKey();
diff --git a/vcl/inc/impfontcache.hxx b/vcl/inc/impfontcache.hxx
index 7e752da1fe5e..78dfb4a71ad9 100644
--- a/vcl/inc/impfontcache.hxx
+++ b/vcl/inc/impfontcache.hxx
@@ -35,22 +35,22 @@ class PhysicalFontCollection;
// TODO: closely couple with PhysicalFontCollection
-struct GlpyhBoundRectCacheKey
+struct GlyphBoundRectCacheKey
{
const LogicalFontInstance* m_pFont;
const sal_GlyphId m_nId;
- GlpyhBoundRectCacheKey(const LogicalFontInstance* pFont, sal_GlyphId nID)
+ GlyphBoundRectCacheKey(const LogicalFontInstance* pFont, sal_GlyphId nID)
: m_pFont(pFont), m_nId(nID)
{}
- bool operator==(GlpyhBoundRectCacheKey const& aOther) const
+ bool operator==(GlyphBoundRectCacheKey const& aOther) const
{ return m_pFont == aOther.m_pFont && m_nId == aOther.m_nId; }
};
-struct GlpyhBoundRectCacheHash
+struct GlyphBoundRectCacheHash
{
- std::size_t operator()(GlpyhBoundRectCacheKey const& aCache) const
+ std::size_t operator()(GlyphBoundRectCacheKey const& aCache) const
{
std::size_t seed = 0;
boost::hash_combine(seed, aCache.m_pFont);
@@ -59,9 +59,9 @@ struct GlpyhBoundRectCacheHash
}
};
-typedef o3tl::lru_map<GlpyhBoundRectCacheKey, tools::Rectangle,
- GlpyhBoundRectCacheHash> GlpyhBoundRectCache;
-typedef GlpyhBoundRectCache::key_value_pair_t GlpyhBoundRectCachePair;
+typedef o3tl::lru_map<GlyphBoundRectCacheKey, tools::Rectangle,
+ GlyphBoundRectCacheHash> GlyphBoundRectCache;
+typedef GlyphBoundRectCache::key_value_pair_t GlyphBoundRectCachePair;
class ImplFontCache
{
@@ -74,7 +74,7 @@ private:
LogicalFontInstance* mpLastHitCacheEntry; ///< keeps the last hit cache entry
FontInstanceList maFontInstanceList;
- GlpyhBoundRectCache m_aBoundRectCache;
+ GlyphBoundRectCache m_aBoundRectCache;
rtl::Reference<LogicalFontInstance> GetFontInstance(PhysicalFontCollection const*, FontSelectPattern&);
diff --git a/vcl/inc/unx/cairotextrender.hxx b/vcl/inc/unx/cairotextrender.hxx
index c0882bc35f86..6b29041b9360 100644
--- a/vcl/inc/unx/cairotextrender.hxx
+++ b/vcl/inc/unx/cairotextrender.hxx
@@ -23,7 +23,6 @@
#include <textrender.hxx>
class FreetypeFont;
-class GlyphCache;
typedef struct _cairo cairo_t;
class VCL_DLLPUBLIC CairoTextRender : public TextRenderImpl
@@ -33,7 +32,6 @@ class VCL_DLLPUBLIC CairoTextRender : public TextRenderImpl
Color mnTextColor;
protected:
- virtual GlyphCache& getPlatformGlyphCache() = 0;
virtual cairo_t* getCairoContext() = 0;
virtual void getSurfaceOffset(double& nDX, double& nDY) = 0;
virtual void releaseCairoContext(cairo_t* cr) = 0;
diff --git a/vcl/inc/unx/freetype_glyphcache.hxx b/vcl/inc/unx/freetype_glyphcache.hxx
index 08604d9b3982..6e9f5f627877 100644
--- a/vcl/inc/unx/freetype_glyphcache.hxx
+++ b/vcl/inc/unx/freetype_glyphcache.hxx
@@ -42,7 +42,7 @@ public:
int GetLangBoost() const { return mnLangBoost; }
private:
- friend class GlyphCache;
+ friend class FreetypeManager;
explicit FreetypeFontFile( const OString& rNativeFileName );
const OString maNativeFileName;
@@ -75,7 +75,7 @@ public:
const FontCharMapRef& GetFontCharMap();
private:
- friend class GlyphCache;
+ friend class FreetypeManager;
explicit FreetypeFontInfo(const FontAttributes&, FreetypeFontFile* const pFontFile,
int nFaceNum, int nFaceVariation, sal_IntPtr nFontId);
diff --git a/vcl/inc/unx/gendata.hxx b/vcl/inc/unx/gendata.hxx
index d8f8149ad6a7..8cf4cfa90103 100644
--- a/vcl/inc/unx/gendata.hxx
+++ b/vcl/inc/unx/gendata.hxx
@@ -16,7 +16,7 @@
#include <memory>
-class GlyphCache;
+class FreetypeManager;
class SalGenericDisplay;
namespace psp
{
@@ -46,10 +46,10 @@ private:
// for transient storage of unicode strings eg. 'u123' by input methods
OUString m_aUnicodeEntry;
- std::unique_ptr<GlyphCache> m_pGlyphCache;
+ std::unique_ptr<FreetypeManager> m_pFreetypeManager;
std::unique_ptr<psp::PrintFontManager> m_pPrintFontManager;
- void InitGlyphCache();
+ void InitFreetypeManager();
void InitPrintFontManager();
public:
@@ -71,19 +71,19 @@ public:
GenericUnixSalDataType GetType() const { return m_eType; }
- GlyphCache* GetGlyphCache()
+ FreetypeManager* GetFreetypeManager()
{
- if (!m_pGlyphCache)
- InitGlyphCache();
- return m_pGlyphCache.get();
+ if (!m_pFreetypeManager)
+ InitFreetypeManager();
+ return m_pFreetypeManager.get();
}
psp::PrintFontManager* GetPrintFontManager()
{
if (!m_pPrintFontManager)
InitPrintFontManager();
- // PrintFontManager needs the GlyphCache
- assert(m_pGlyphCache.get());
+ // PrintFontManager needs the FreetypeManager
+ assert(m_pFreetypeManager.get());
return m_pPrintFontManager.get();
}
diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h
index 73084a4f6a61..ed735474d443 100644
--- a/vcl/inc/unx/genpspgraphics.h
+++ b/vcl/inc/unx/genpspgraphics.h
@@ -35,7 +35,6 @@ namespace psp { struct JobData; class PrinterGfx; }
class FreetypeFont;
class FontAttributes;
class SalInfoPrinter;
-class GlyphCache;
class ImplFontMetricData;
class VCL_DLLPUBLIC GenPspGraphics : public SalGraphics
@@ -94,8 +93,7 @@ public:
const OUString& rFontName ) override;
static bool AddTempDevFontHelper( PhysicalFontCollection* pFontCollection,
const OUString& rFileURL,
- const OUString& rFontName,
- GlyphCache &rGC );
+ const OUString& rFontName);
virtual bool CreateFontSubset( const OUString& rToFile,
const PhysicalFontFace*,
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index f369952faac4..547235a49f6c 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -27,6 +27,7 @@
#include <tools/gen.hxx>
#include <tools/solar.h>
+#include <unx/gendata.hxx>
#include <vcl/dllapi.h>
#include <vcl/outdev.hxx>
@@ -49,7 +50,7 @@ namespace basegfx { class B2DPolyPolygon; }
namespace vcl { struct FontCapabilities; }
/**
- * The GlyphCache caches various aspects of Freetype fonts
+ * The FreetypeManager caches various aspects of Freetype fonts
*
* It mainly consists of three std::unordered_map lists, which hold the items of the cache.
*
@@ -67,19 +68,19 @@ namespace vcl { struct FontCapabilities; }
* FreetypeFontInfo therefore is embedded in the Freetype subclass of PhysicalFontFace.
* FreetypeFont is embedded in the Freetype subclass of LogicalFontInstance.
*
- * Nowadays there is not really a reason to have seperate files for the classes, as the GlyphCache is
- * just about handling of Freetype based fonts, not some abstract glyphs.
+ * Nowadays there is not really a reason to have seperate files for the classes, as the FreetypeManager
+ * is just about handling of Freetype based fonts, not some abstract glyphs.
*
* One additional note: the byte-size based garbage collection of unused fonts can currently be assumed
* to be broken. Since the move of the glyph rect cache into the ImplFontCache, so it can be used by all
* platforms, it just takes too long to kick-in, as there is no real accounting left.
**/
-class VCL_DLLPUBLIC GlyphCache final
+class VCL_DLLPUBLIC FreetypeManager final
{
public:
- ~GlyphCache();
+ ~FreetypeManager();
- static GlyphCache& GetInstance();
+ static FreetypeManager& get();
void AddFontFile(const OString& rNormalizedName,
int nFaceNum, int nVariantNum,
@@ -109,14 +110,14 @@ public:
private:
// to access the constructor (can't use InitFreetypeManager function, because it's private?!)
friend class GenericUnixSalData;
- explicit GlyphCache();
+ explicit FreetypeManager();
static void InitFreetype();
void GarbageCollect();
FreetypeFont* CreateFont(LogicalFontInstance* pLogicalFont);
FreetypeFontFile* FindFontFile(const OString& rNativeFileName);
- // the GlyphCache's FontList matches a font request to a serverfont instance
+ // the FreetypeManager's FontList matches a font request to a serverfont instance
// the FontList key's mpFontData member is reinterpreted as integer font id
struct IFSD_Equal{ bool operator()( const rtl::Reference<LogicalFontInstance>&, const rtl::Reference<LogicalFontInstance>& ) const; };
struct IFSD_Hash{ size_t operator()( const rtl::Reference<LogicalFontInstance>& ) const; };
@@ -171,7 +172,7 @@ public:
static bool AlmostHorizontalDrainsRenderingPool();
private:
- friend class GlyphCache;
+ friend class FreetypeManager;
explicit FreetypeFont(LogicalFontInstance*, FreetypeFontInfo*);
void AddRef() const { ++mnRefCount; }
@@ -185,7 +186,7 @@ private:
rtl::Reference<FreetypeFontInstance> mpFontInstance;
- // used by GlyphCache for cache LRU algorithm
+ // used by FreetypeManager for cache LRU algorithm
mutable long mnRefCount;
mutable sal_uLong mnBytesUsed;
diff --git a/vcl/ios/dummies.cxx b/vcl/ios/dummies.cxx
index efc0daae0f86..d62609dc95bf 100644
--- a/vcl/ios/dummies.cxx
+++ b/vcl/ios/dummies.cxx
@@ -23,7 +23,7 @@
#include "unx/fontmanager.hxx"
#include "unx/gendata.hxx"
-class GlyphCache
+class FreetypeManager
{
};
@@ -120,7 +120,7 @@ using namespace psp;
GenericUnixSalData::GenericUnixSalData(GenericUnixSalDataType const t, SalInstance *const pInstance)
: m_eType(t)
, m_pDisplay(nullptr)
- , m_pGlyphCache(new GlyphCache)
+ , m_pFreetypeManager(new FreetypeManager)
, m_pPrintFontManager(nullptr)
{
m_pInstance = pInstance;
diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx
index 9f9bf2557c3d..c50f8c57ddc6 100644
--- a/vcl/qt5/Qt5Data.cxx
+++ b/vcl/qt5/Qt5Data.cxx
@@ -171,7 +171,7 @@ Qt5Data::Qt5Data(SalInstance* pInstance)
+ style->pixelMetric(QStyle::PM_MenuVMargin);
}
-// outline dtor b/c of GlyphCache incomplete type
+// outline dtor b/c of FreetypeManager incomplete type
Qt5Data::~Qt5Data() {}
static QCursor* getQCursorFromXBM(const unsigned char* pBitmap, const unsigned char* pMask,
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index 85b51b82b1eb..d72bfdbc46b4 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -91,7 +91,7 @@ void Qt5Graphics::GetDevFontList(PhysicalFontCollection* pPFC)
return;
QFontDatabase aFDB;
- GlyphCache& rGC = GlyphCache::GetInstance();
+ FreetypeManager& rFontManager = FreetypeManager::get();
psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
::std::vector<psp::fontID> aList;
psp::FastPrintFontInfo aInfo;
@@ -102,15 +102,15 @@ void Qt5Graphics::GetDevFontList(PhysicalFontCollection* pPFC)
if (!rMgr.getFontFastInfo(elem, aInfo))
continue;
- // normalize face number to the GlyphCache
+ // normalize face number to the FreetypeManager
int nFaceNum = rMgr.getFontFaceNumber(aInfo.m_nID);
int nVariantNum = rMgr.getFontFaceVariation(aInfo.m_nID);
- // inform GlyphCache about this font provided by the PsPrint subsystem
+ // inform FreetypeManager about this font provided by the PsPrint subsystem
FontAttributes aDFA = GenPspGraphics::Info2FontAttributes(aInfo);
aDFA.IncreaseQualityBy(4096);
const OString& rFileName = rMgr.getFontFileSysPath(aInfo.m_nID);
- rGC.AddFontFile(rFileName, nFaceNum, nVariantNum, aInfo.m_nID, aDFA);
+ rFontManager.AddFontFile(rFileName, nFaceNum, nVariantNum, aInfo.m_nID, aDFA);
}
if (bUseFontconfig)
diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx
index f3f87d36616b..cf77f99a1f46 100644
--- a/vcl/source/font/fontcache.cxx
+++ b/vcl/source/font/fontcache.cxx
@@ -97,7 +97,7 @@ ImplFontCache::~ImplFontCache()
for (const auto & rLFI : maFontInstanceList)
{
#if !(defined(_WIN32) || defined(MACOSX) || defined(IOS))
- GlyphCache::GetInstance().TryGarbageCollectFont(rLFI.second.get());
+ FreetypeManager::get().TryGarbageCollectFont(rLFI.second.get());
#endif
rLFI.second->mpFontCache = nullptr;
}
@@ -186,7 +186,7 @@ rtl::Reference<LogicalFontInstance> ImplFontCache::GetFontInstance( PhysicalFont
LogicalFontInstance* pFontEntry = rFontPair.second.get();
if (pFontEntry->m_nCount > 1)
return false;
- m_aBoundRectCache.remove_if([&pFontEntry] (GlpyhBoundRectCachePair const& rGlyphPair)
+ m_aBoundRectCache.remove_if([&pFontEntry] (GlyphBoundRectCachePair const& rGlyphPair)
{ return rGlyphPair.first.m_pFont == pFontEntry; });
if (mpLastHitCacheEntry == pFontEntry)
mpLastHitCacheEntry = nullptr;
diff --git a/vcl/unx/generic/app/gendata.cxx b/vcl/unx/generic/app/gendata.cxx
index ea091105529a..500d3b13331e 100644
--- a/vcl/unx/generic/app/gendata.cxx
+++ b/vcl/unx/generic/app/gendata.cxx
@@ -32,11 +32,11 @@ GenericUnixSalData::GenericUnixSalData(GenericUnixSalDataType const t, SalInstan
GenericUnixSalData::~GenericUnixSalData() {}
-void GenericUnixSalData::InitGlyphCache() { m_pGlyphCache.reset(new GlyphCache); }
+void GenericUnixSalData::InitFreetypeManager() { m_pFreetypeManager.reset(new FreetypeManager); }
void GenericUnixSalData::InitPrintFontManager()
{
- GetGlyphCache();
+ GetFreetypeManager();
m_pPrintFontManager.reset(new psp::PrintFontManager);
m_pPrintFontManager->initialize();
}
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 21ddd3eab4ee..8756fc2299e3 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -336,7 +336,7 @@ void SalDisplay::doDestruct()
rMap.clear();
}
}
- GlyphCache::GetInstance().ClearFontCache();
+ FreetypeManager::get().ClearFontCache();
if( IsDisplay() )
{
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 9610a73bc1d6..0a290c1d1958 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -94,7 +94,7 @@ void CairoTextRender::SetFont(LogicalFontInstance *pEntry, int nFallbackLevel)
if( mpFreetypeFont[i] != nullptr )
{
// old server side font is no longer referenced
- GlyphCache::GetInstance().UncacheFont( *mpFreetypeFont[i] );
+ FreetypeManager::get().UncacheFont( *mpFreetypeFont[i] );
mpFreetypeFont[i] = nullptr;
}
}
@@ -103,14 +103,14 @@ void CairoTextRender::SetFont(LogicalFontInstance *pEntry, int nFallbackLevel)
if( !pEntry )
return;
- // handle the request for a non-native X11-font => use the GlyphCache
- FreetypeFont* pFreetypeFont = GlyphCache::GetInstance().CacheFont(pEntry);
+ // handle the request for a non-native X11-font => use the FreetypeManager
+ FreetypeFont* pFreetypeFont = FreetypeManager::get().CacheFont(pEntry);
if( pFreetypeFont != nullptr )
{
// ignore fonts with e.g. corrupted font files
if( !pFreetypeFont->TestFont() )
{
- GlyphCache::GetInstance().UncacheFont( *pFreetypeFont );
+ FreetypeManager::get().UncacheFont( *pFreetypeFont );
return;
}
@@ -398,19 +398,18 @@ bool CairoTextRender::AddTempDevFont( PhysicalFontCollection* pFontCollection,
const OUString& rFileURL,
const OUString& rFontName )
{
- return GenPspGraphics::AddTempDevFontHelper( pFontCollection, rFileURL, rFontName, getPlatformGlyphCache() );
+ return GenPspGraphics::AddTempDevFontHelper(pFontCollection, rFileURL, rFontName);
}
void CairoTextRender::ClearDevFontCache()
{
- GlyphCache& rGC = getPlatformGlyphCache();
- rGC.ClearFontCache();
+ FreetypeManager::get().ClearFontCache();
}
void CairoTextRender::GetDevFontList( PhysicalFontCollection* pFontCollection )
{
- // prepare the GlyphCache using psprint's font infos
- GlyphCache& rGC = getPlatformGlyphCache();
+ // prepare the FreetypeManager using psprint's font infos
+ FreetypeManager& rFreetypeManager = FreetypeManager::get();
psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
::std::vector< psp::fontID > aList;
@@ -421,19 +420,19 @@ void CairoTextRender::GetDevFontList( PhysicalFontCollection* pFontCollection )
if( !rMgr.getFontFastInfo( elem, aInfo ) )
continue;
- // normalize face number to the GlyphCache
+ // normalize face number to the FreetypeManager
int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID );
int nVariantNum = rMgr.getFontFaceVariation( aInfo.m_nID );
- // inform GlyphCache about this font provided by the PsPrint subsystem
+ // inform FreetypeManager about this font provided by the PsPrint subsystem
FontAttributes aDFA = GenPspGraphics::Info2FontAttributes( aInfo );
aDFA.IncreaseQualityBy( 4096 );
const OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID );
- rGC.AddFontFile( rFileName, nFaceNum, nVariantNum, aInfo.m_nID, aDFA );
+ rFreetypeManager.AddFontFile(rFileName, nFaceNum, nVariantNum, aInfo.m_nID, aDFA);
}
// announce glyphcache fonts
- rGC.AnnounceFonts( pFontCollection );
+ rFreetypeManager.AnnounceFonts(pFontCollection);
// register platform specific font substitutions if available
if (!utl::ConfigManager::IsFuzzing())
@@ -503,7 +502,7 @@ bool CairoTextRender::CreateFontSubset(
// font since they are the only ones left after the PDF
// export has filtered its list of subsettable fonts (for
// which this method was created). The correct way would
- // be to have the GlyphCache search for the PhysicalFontFace pFont
+ // be to have the FreetypeManager search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
@@ -523,7 +522,7 @@ const void* CairoTextRender::GetEmbedFontData(const PhysicalFontFace* pFont, lon
// font since they are the only ones left after the PDF
// export has filtered its list of subsettable fonts (for
// which this method was created). The correct way would
- // be to have the GlyphCache search for the PhysicalFontFace pFont
+ // be to have the FreetypeManager search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
return GenPspGraphics::DoGetEmbedFontData(aFont, pDataLen);
}
@@ -542,7 +541,7 @@ void CairoTextRender::GetGlyphWidths( const PhysicalFontFace* pFont,
// font since they are the only ones left after the PDF
// export has filtered its list of subsettable fonts (for
// which this method was created). The correct way would
- // be to have the GlyphCache search for the PhysicalFontFace pFont
+ // be to have the FreetypeManager search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
GenPspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc );
}
diff --git a/vcl/unx/generic/gdi/x11cairotextrender.cxx b/vcl/unx/generic/gdi/x11cairotextrender.cxx
index 81af057a06ac..426a5222e143 100644
--- a/vcl/unx/generic/gdi/x11cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/x11cairotextrender.cxx
@@ -29,11 +29,6 @@ X11CairoTextRender::X11CairoTextRender(X11SalGraphics& rParent)
{
}
-GlyphCache& X11CairoTextRender::getPlatformGlyphCache()
-{
- return GlyphCache::GetInstance();
-}
-
cairo_t* X11CairoTextRender::getCairoContext()
{
return mrParent.getCairoContext();
diff --git a/vcl/unx/generic/gdi/x11cairotextrender.hxx b/vcl/unx/generic/gdi/x11cairotextrender.hxx
index 3eaf220f3eb6..666f09f8c0c9 100644
--- a/vcl/unx/generic/gdi/x11cairotextrender.hxx
+++ b/vcl/unx/generic/gdi/x11cairotextrender.hxx
@@ -35,7 +35,6 @@ protected:
public:
explicit X11CairoTextRender(X11SalGraphics& rParent);
- virtual GlyphCache& getPlatformGlyphCache() override;
virtual cairo_t* getCairoContext() override;
virtual void getSurfaceOffset(double& nDX, double& nDY) override;
virtual void clipRegion(cairo_t* cr) override;
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 6535c7c4b976..5d64fc08c4a1 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -278,7 +278,7 @@ void FreetypeFontInfo::AnnounceFont( PhysicalFontCollection* pFontCollection )
pFontCollection->Add( pFD.get() );
}
-void GlyphCache::InitFreetype()
+void FreetypeManager::InitFreetype()
{
/*FT_Error rcFT =*/ FT_Init_FreeType( &aLibFT );
@@ -319,7 +319,7 @@ FT_Face FreetypeFont::GetFtFace() const
return maFaceFT;
}
-void GlyphCache::AddFontFile(const OString& rNormalizedName,
+void FreetypeManager::AddFontFile(const OString& rNormalizedName,
int nFaceNum, int nVariantNum, sal_IntPtr nFontId, const FontAttributes& rDevFontAttr)
{
if( rNormalizedName.isEmpty() )
@@ -335,7 +335,7 @@ void GlyphCache::AddFontFile(const OString& rNormalizedName,
m_nMaxFontId = nFontId;
}
-void GlyphCache::AnnounceFonts( PhysicalFontCollection* pToAdd ) const
+void FreetypeManager::AnnounceFonts( PhysicalFontCollection* pToAdd ) const
{
for (auto const& font : m_aFontInfoList)
{
@@ -344,7 +344,7 @@ void GlyphCache::AnnounceFonts( PhysicalFontCollection* pToAdd ) const
}
}
-FreetypeFont* GlyphCache::CreateFont(LogicalFontInstance* pFontInstance)
+FreetypeFont* FreetypeManager::CreateFont(LogicalFontInstance* pFontInstance)
{
// find a FontInfo matching to the font id
if (!pFontInstance)
diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx
index 9640ea70adcf..40e96b9789df 100644
--- a/vcl/unx/generic/glyphs/glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/glyphcache.cxx
@@ -26,20 +26,20 @@
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
-GlyphCache::GlyphCache()
-: mnBytesUsed(sizeof(GlyphCache)),
+FreetypeManager::FreetypeManager()
+: mnBytesUsed(sizeof(FreetypeManager)),
mpCurrentGCFont(nullptr)
, m_nMaxFontId(0)
{
InitFreetype();
}
-GlyphCache::~GlyphCache()
+FreetypeManager::~FreetypeManager()
{
ClearFontCache();
}
-void GlyphCache::ClearFontCache()
+void FreetypeManager::ClearFontCache()
{
for (auto &aFontPair : maFontList)
static_cast<FreetypeFontInstance*>(aFontPair.first.get())->SetFreetypeFont(nullptr);
@@ -48,7 +48,7 @@ void GlyphCache::ClearFontCache()
m_aFontInfoList.clear();
}
-void GlyphCache::ClearFontOptions()
+void FreetypeManager::ClearFontOptions()
{
for (auto const& font : maFontList)
{
@@ -66,7 +66,7 @@ static sal_IntPtr GetFontId(const LogicalFontInstance& rFontInstance)
}
inline
-size_t GlyphCache::IFSD_Hash::operator()(const rtl::Reference<LogicalFontInstance>& rFontInstance) const
+size_t FreetypeManager::IFSD_Hash::operator()(const rtl::Reference<LogicalFontInstance>& rFontInstance) const
{
// TODO: is it worth to improve this hash function?
sal_uIntPtr nFontId = GetFontId(*rFontInstance);
@@ -91,7 +91,7 @@ size_t GlyphCache::IFSD_Hash::operator()(const rtl::Reference<LogicalFontInstanc
return seed;
}
-bool GlyphCache::IFSD_Equal::operator()(const rtl::Reference<LogicalFontInstance>& rAFontInstance,
+bool FreetypeManager::IFSD_Equal::operator()(const rtl::Reference<LogicalFontInstance>& rAFontInstance,
const rtl::Reference<LogicalFontInstance>& rBFontInstance) const
{
if (!rAFontInstance->GetFontCache() || !rBFontInstance->GetFontCache())
@@ -141,14 +141,14 @@ bool GlyphCache::IFSD_Equal::operator()(const rtl::Reference<LogicalFontInstance
return true;
}
-GlyphCache& GlyphCache::GetInstance()
+FreetypeManager& FreetypeManager::get()
{
GenericUnixSalData* const pSalData(GetGenericUnixSalData());
assert(pSalData);
- return *pSalData->GetGlyphCache();
+ return *pSalData->GetFreetypeManager();
}
-FreetypeFont* GlyphCache::CacheFont(LogicalFontInstance* pFontInstance)
+FreetypeFont* FreetypeManager::CacheFont(LogicalFontInstance* pFontInstance)
{
// a serverfont request has a fontid > 0
if (GetFontId(*pFontInstance) <= 0)
@@ -190,7 +190,7 @@ FreetypeFont* GlyphCache::CacheFont(LogicalFontInstance* pFontInstance)
return pNew;
}
-void GlyphCache::UncacheFont( FreetypeFont& rFreetypeFont )
+void FreetypeManager::UncacheFont( FreetypeFont& rFreetypeFont )
{
if( (rFreetypeFont.Release() <= 0) && (gnMaxSize <= mnBytesUsed) )
{
@@ -199,7 +199,7 @@ void GlyphCache::UncacheFont( FreetypeFont& rFreetypeFont )
}
}
-void GlyphCache::TryGarbageCollectFont(LogicalFontInstance *pFontInstance)
+void FreetypeManager::TryGarbageCollectFont(LogicalFontInstance *pFontInstance)
{
if (maFontList.empty() || !pFontInstance)
return;
@@ -214,7 +214,7 @@ void GlyphCache::TryGarbageCollectFont(LogicalFontInstance *pFontInstance)
}
}
-void GlyphCache::GarbageCollect()
+void FreetypeManager::GarbageCollect()
{
// when current GC font has been destroyed get another one
if( !mpCurrentGCFont )
@@ -236,7 +236,7 @@ void GlyphCache::GarbageCollect()
&& (pFreetypeFont->GetRefCount() <= 0) ) // font still used
{
SAL_WARN_IF( (pFreetypeFont->GetRefCount() != 0), "vcl",
- "GlyphCache::GC detected RefCount underflow" );
+ "FreetypeManager::GC detected RefCount underflow" );
// free all pFreetypeFont related data
if( pFreetypeFont == mpCurrentGCFont )
@@ -259,7 +259,7 @@ void GlyphCache::GarbageCollect()
}
}
-FreetypeFontFile* GlyphCache::FindFontFile(const OString& rNativeFileName)
+FreetypeFontFile* FreetypeManager::FindFontFile(const OString& rNativeFileName)
{
// font file already known? (e.g. for ttc, synthetic, aliased fonts)
const char* pFileName = rNativeFileName.getStr();
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index 61d924caf999..ab5c2ab77d7a 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -616,7 +616,7 @@ void GenPspGraphics::SetFont(LogicalFontInstance *pFontInstance, int nFallbackLe
if( m_pFreetypeFont[i] != nullptr )
{
// old server side font is no longer referenced
- GlyphCache::GetInstance().UncacheFont( *m_pFreetypeFont[i] );
+ FreetypeManager::get().UncacheFont(*m_pFreetypeFont[i]);
m_pFreetypeFont[i] = nullptr;
}
}
@@ -647,13 +647,13 @@ void GenPspGraphics::SetFont(LogicalFontInstance *pFontInstance, int nFallbackLe
// also set the serverside font for layouting
// requesting a font provided by builtin rasterizer
- FreetypeFont* pFreetypeFont = GlyphCache::GetInstance().CacheFont(pFontInstance);
+ FreetypeFont* pFreetypeFont = FreetypeManager::get().CacheFont(pFontInstance);
if( pFreetypeFont != nullptr )
{
if( pFreetypeFont->TestFont() )
m_pFreetypeFont[ nFallbackLevel ] = pFreetypeFont;
else
- GlyphCache::GetInstance().UncacheFont( *pFreetypeFont );
+ FreetypeManager::get().UncacheFont( *pFreetypeFont );
}
// set the printer font
@@ -682,8 +682,7 @@ bool GenPspGraphics::AddTempDevFont( PhysicalFontCollection*, const OUString&,co
bool GenPspGraphics::AddTempDevFontHelper( PhysicalFontCollection* pFontCollection,
const OUString& rFileURL,
- const OUString& rFontName,
- GlyphCache &rGC )
+ const OUString& rFontName)
{
// inform PSP font manager
psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
@@ -691,6 +690,7 @@ bool GenPspGraphics::AddTempDevFontHelper( PhysicalFontCollection* pFontCollecti
if( aFontIds.empty() )
return false;
+ FreetypeManager& rFreetypeManager = FreetypeManager::get();
for (auto const& elem : aFontIds)
{
// prepare font data
@@ -706,11 +706,11 @@ bool GenPspGraphics::AddTempDevFontHelper( PhysicalFontCollection* pFontCollecti
int nVariantNum = rMgr.getFontFaceVariation( aInfo.m_nID );
const OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID );
- rGC.AddFontFile( rFileName, nFaceNum, nVariantNum, aInfo.m_nID, aDFA );
+ rFreetypeManager.AddFontFile(rFileName, nFaceNum, nVariantNum, aInfo.m_nID, aDFA);
}
// announce new font to device's font list
- rGC.AnnounceFonts( pFontCollection );
+ rFreetypeManager.AnnounceFonts(pFontCollection);
return true;
}
@@ -731,7 +731,7 @@ void GenPspGraphics::GetDevFontList( PhysicalFontCollection *pFontCollection )
void GenPspGraphics::ClearDevFontCache()
{
- GlyphCache::GetInstance().ClearFontCache();
+ FreetypeManager::get().ClearFontCache();
}
void GenPspGraphics::GetFontMetric(ImplFontMetricDataRef& rxFontMetric, int nFallbackLevel)
@@ -765,7 +765,7 @@ bool GenPspGraphics::CreateFontSubset(
// font since they are the only ones left after the PDF
// export has filtered its list of subsettable fonts (for
// which this method was created). The correct way would
- // be to have the GlyphCache search for the PhysicalFontFace pFont
+ // be to have the FreetypeManager search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
@@ -788,7 +788,7 @@ void GenPspGraphics::GetGlyphWidths( const PhysicalFontFace* pFont,
// font since they are the only ones left after the PDF
// export has filtered its list of subsettable fonts (for
// which this method was created). The correct way would
- // be to have the GlyphCache search for the PhysicalFontFace pFont
+ // be to have the FreetypeManager search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
GenPspGraphics::DoGetGlyphWidths( aFont, bVertical, rWidths, rUnicodeEnc );
}
@@ -997,7 +997,7 @@ const void* GenPspGraphics::GetEmbedFontData(const PhysicalFontFace* pFont, long
// font since they are the only ones left after the PDF
// export has filtered its list of subsettable fonts (for
// which this method was created). The correct way would
- // be to have the GlyphCache search for the PhysicalFontFace pFont
+ // be to have the FreetypeManager search for the PhysicalFontFace pFont
psp::fontID aFont = pFont->GetFontId();
return DoGetEmbedFontData(aFont, pDataLen);
}
diff --git a/vcl/workben/docxfuzzer.cxx b/vcl/workben/docxfuzzer.cxx
index d8751bd0f1bb..ab9b30696cad 100644
--- a/vcl/workben/docxfuzzer.cxx
+++ b/vcl/workben/docxfuzzer.cxx
@@ -31,7 +31,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/fodpfuzzer.cxx b/vcl/workben/fodpfuzzer.cxx
index 55fb840db9cd..12bfbc353ae0 100644
--- a/vcl/workben/fodpfuzzer.cxx
+++ b/vcl/workben/fodpfuzzer.cxx
@@ -36,7 +36,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/fodsfuzzer.cxx b/vcl/workben/fodsfuzzer.cxx
index 370eed84fb2f..030ac147b77e 100644
--- a/vcl/workben/fodsfuzzer.cxx
+++ b/vcl/workben/fodsfuzzer.cxx
@@ -31,7 +31,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/fodtfuzzer.cxx b/vcl/workben/fodtfuzzer.cxx
index c2e837b14dbd..e68e37bf06ab 100644
--- a/vcl/workben/fodtfuzzer.cxx
+++ b/vcl/workben/fodtfuzzer.cxx
@@ -31,7 +31,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/htmlfuzzer.cxx b/vcl/workben/htmlfuzzer.cxx
index 96c9171c1446..1c466fb1a3e3 100644
--- a/vcl/workben/htmlfuzzer.cxx
+++ b/vcl/workben/htmlfuzzer.cxx
@@ -28,7 +28,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/mmlfuzzer.cxx b/vcl/workben/mmlfuzzer.cxx
index 675b22ee5284..02bd50236e93 100644
--- a/vcl/workben/mmlfuzzer.cxx
+++ b/vcl/workben/mmlfuzzer.cxx
@@ -26,7 +26,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/pptfuzzer.cxx b/vcl/workben/pptfuzzer.cxx
index dfcc41abc50c..6e725b554e31 100644
--- a/vcl/workben/pptfuzzer.cxx
+++ b/vcl/workben/pptfuzzer.cxx
@@ -132,7 +132,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/pptxfuzzer.cxx b/vcl/workben/pptxfuzzer.cxx
index c1cdec3d90d7..021bc398de64 100644
--- a/vcl/workben/pptxfuzzer.cxx
+++ b/vcl/workben/pptxfuzzer.cxx
@@ -30,7 +30,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/rtffuzzer.cxx b/vcl/workben/rtffuzzer.cxx
index da039085bca5..cc109fcfdb6e 100644
--- a/vcl/workben/rtffuzzer.cxx
+++ b/vcl/workben/rtffuzzer.cxx
@@ -87,7 +87,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/scrtffuzzer.cxx b/vcl/workben/scrtffuzzer.cxx
index 0646d71c295e..0afaf8fbe97b 100644
--- a/vcl/workben/scrtffuzzer.cxx
+++ b/vcl/workben/scrtffuzzer.cxx
@@ -80,7 +80,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/wksfuzzer.cxx b/vcl/workben/wksfuzzer.cxx
index e4eae020159d..617bce16cc9b 100644
--- a/vcl/workben/wksfuzzer.cxx
+++ b/vcl/workben/wksfuzzer.cxx
@@ -50,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
// fontconfigs alloc mechanism is too complicated for lsan/valgrind so
// force the fontconfig options to be released now, they are demand loaded
// so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/wmffuzzer.cxx b/vcl/workben/wmffuzzer.cxx
index 7cc43d793d60..ebb9c4cd4cd7 100644
--- a/vcl/workben/wmffuzzer.cxx
+++ b/vcl/workben/wmffuzzer.cxx
@@ -65,7 +65,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/ww2fuzzer.cxx b/vcl/workben/ww2fuzzer.cxx
index c6a44111f510..5e743ee62cc3 100644
--- a/vcl/workben/ww2fuzzer.cxx
+++ b/vcl/workben/ww2fuzzer.cxx
@@ -101,7 +101,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/ww6fuzzer.cxx b/vcl/workben/ww6fuzzer.cxx
index d98b7a579448..ceba3ff0b883 100644
--- a/vcl/workben/ww6fuzzer.cxx
+++ b/vcl/workben/ww6fuzzer.cxx
@@ -103,7 +103,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/ww8fuzzer.cxx b/vcl/workben/ww8fuzzer.cxx
index a1c6a8544655..cdb2cbe89a8b 100644
--- a/vcl/workben/ww8fuzzer.cxx
+++ b/vcl/workben/ww8fuzzer.cxx
@@ -103,7 +103,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/xlsfuzzer.cxx b/vcl/workben/xlsfuzzer.cxx
index 2878bd5cc1a4..14d9eea2622f 100644
--- a/vcl/workben/xlsfuzzer.cxx
+++ b/vcl/workben/xlsfuzzer.cxx
@@ -50,7 +50,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}
diff --git a/vcl/workben/xlsxfuzzer.cxx b/vcl/workben/xlsxfuzzer.cxx
index 279fdceb7e20..79ad9e0bcff7 100644
--- a/vcl/workben/xlsxfuzzer.cxx
+++ b/vcl/workben/xlsxfuzzer.cxx
@@ -28,7 +28,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
//fontconfigs alloc mechanism is too complicated for lsan/valgrind so
//force the fontconfig options to be released now, they are demand loaded
//so will be recreated if necessary
- SvpSalGraphics::getPlatformGlyphCache().ClearFontOptions();
+ FreetypeManager::get().ClearFontOptions();
return 0;
}