From d85003a8af8b454b34eea0ac67c8dd9184a0b6d3 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 15 Dec 2016 02:47:13 +0200 Subject: tdf#104159: Re-enable OpenGL glyph caching on Windows Reviewed-on: https://gerrit.libreoffice.org/32026 Tested-by: Jenkins Reviewed-by: Khaled Hosny (cherry picked from commit 9cf20b5f0473db0b4dd2dcf607b7884f40762995) Change-Id: Icafec05a8cf4428d806efcb286addf3042fcf021 Reviewed-on: https://gerrit.libreoffice.org/32066 Tested-by: Jenkins Reviewed-by: Khaled Hosny --- vcl/inc/CommonSalLayout.hxx | 3 +++ vcl/inc/win/salgdi.h | 3 +++ vcl/inc/win/winlayout.hxx | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'vcl/inc') diff --git a/vcl/inc/CommonSalLayout.hxx b/vcl/inc/CommonSalLayout.hxx index e5345d77a65b..e2f3a114eee1 100644 --- a/vcl/inc/CommonSalLayout.hxx +++ b/vcl/inc/CommonSalLayout.hxx @@ -45,6 +45,7 @@ class CommonSalLayout : public GenericSalLayout #ifdef _WIN32 HDC mhDC; HFONT mhFont; + WinFontInstance& mrWinFontInstance; double mnAveWidthFactor; #elif defined(MACOSX) || defined(IOS) const CoreTextStyle& mrCoreTextStyle; @@ -65,6 +66,8 @@ public: #if defined(_WIN32) explicit CommonSalLayout(HDC, WinFontInstance&, const WinFontFace&); const FontSelectPattern& getFontSelData() const { return mrFontSelData; }; + HFONT getHFONT() const { return mhFont; } + WinFontInstance& getWinFontInstance() const { return mrWinFontInstance; } #elif defined(MACOSX) || defined(IOS) explicit CommonSalLayout(const CoreTextStyle&); const CoreTextStyle& getFontData() const { return mrCoreTextStyle; }; diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 305005540841..14310f90411e 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -236,6 +236,9 @@ private: LogicalFontInstance* GetWinFontEntry(int nFallbackLevel); + bool CacheGlyphs(const CommonSalLayout& rLayout); + bool DrawCachedGlyphs(const CommonSalLayout& rLayout); + public: HDC getHDC() const { return mhLocalDC; } void setHDC(HDC aNew) { mhLocalDC = aNew; } diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index 7b15e7e4f5f3..8ceebeac3882 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -193,7 +193,7 @@ public: private: GlyphCache maGlyphCache; public: - bool CacheGlyphToAtlas(bool bRealGlyphIndices, int nGlyphIndex, const WinLayout& rLayout, SalGraphics& rGraphics); + bool CacheGlyphToAtlas(bool bRealGlyphIndices, HDC hDC, HFONT hFont, int nGlyphIndex, SalGraphics& rGraphics); GlyphCache& GetGlyphCache() { -- cgit