summaryrefslogtreecommitdiff
path: root/vcl/inc/win
diff options
context:
space:
mode:
authorAkash Jain <akash96j@gmail.com>2016-08-17 21:31:22 +0530
committerKhaled Hosny <khaledhosny@eglug.org>2016-10-18 20:41:30 +0200
commit5e65efcaa38ea5fbe655a18082a3ba7c8cf7d5fe (patch)
treef4d343cd38c51bf3ed86561aef951b3abf91db0f /vcl/inc/win
parent3eda74cf7e9d23cc08f07c38f3bee04b565ff9db (diff)
GSoC: Speed up CommonSalLayout by caching hb_face
Cache hb_face so it is not created again and again. Switch from GDI to DirectWrite on Windows to obtain SFNT table data. Change-Id: I9c532cd72e1f6b57313f3b7d42a6b9b0633eb0ef
Diffstat (limited to 'vcl/inc/win')
-rw-r--r--vcl/inc/win/salgdi.h8
-rwxr-xr-xvcl/inc/win/winlayout.hxx1
2 files changed, 8 insertions, 1 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index c4fb26d48a45..ad934108b528 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -44,6 +44,9 @@
# include "postwin.h"
#endif
+#include <hb-ot.h>
+#include <dwrite.h>
+
class FontSelectPattern;
class WinFontInstance;
class ImplFontAttrCache;
@@ -139,10 +142,12 @@ private:
mutable std::unordered_set<sal_UCS4> maGsubTable;
mutable bool mbGsubRead;
+ mutable hb_face_t* mpHbFace;
public:
bool HasGSUBstitutions( HDC ) const;
bool IsGSUBstituted( sal_UCS4 ) const;
- static int GetTable( const char pTagName[5], const unsigned char*&, HDC );
+ hb_face_t* GetHbFace() const { return mpHbFace; }
+ void SetHbFace( hb_face_t* pHbFace ) const { mpHbFace = pHbFace; }
};
/** Class that creates (and destroys) a compatible Device Context.
@@ -353,6 +358,7 @@ private:
sal_uLong GetKernPairs();
public:
+ sal_uLong GetTable( const char pTagName[5], const unsigned char*&, void*&, IDWriteFontFace*& );
// public SalGraphics methods, the interface to the independent vcl part
// get device resolution
diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx
index fd69ee03f242..1f0425133e83 100755
--- a/vcl/inc/win/winlayout.hxx
+++ b/vcl/inc/win/winlayout.hxx
@@ -482,6 +482,7 @@ public:
std::vector<Rectangle> GetGlyphInkBoxes(uint16_t * pGid, uint16_t * pGidEnd) const /*override*/;
ID2D1RenderTarget * GetRenderTarget() const { return mpRT; }
+ IDWriteFontFace * GetDWriteFontFace(HDC) const;
IDWriteFontFace * GetFontFace() const { return mpFontFace; }
float GetEmHeight() const { return mlfEmHeight; }