summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-12-15 02:47:13 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-12-16 05:56:44 +0000
commitd85003a8af8b454b34eea0ac67c8dd9184a0b6d3 (patch)
treef40faab2322af0e6eef856c990d3bf6246919abf /vcl/inc
parent641b3461dd57b73807f7f55fa2d9b08fb777ed20 (diff)
tdf#104159: Re-enable OpenGL glyph caching on Windows
Reviewed-on: https://gerrit.libreoffice.org/32026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit 9cf20b5f0473db0b4dd2dcf607b7884f40762995) Change-Id: Icafec05a8cf4428d806efcb286addf3042fcf021 Reviewed-on: https://gerrit.libreoffice.org/32066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/CommonSalLayout.hxx3
-rw-r--r--vcl/inc/win/salgdi.h3
-rw-r--r--vcl/inc/win/winlayout.hxx2
3 files changed, 7 insertions, 1 deletions
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()
{