summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-09-07 19:40:11 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-10-18 20:41:31 +0200
commit26e799a3f747723b428c29fbc314d5c42f12c030 (patch)
treef5c05e379a707f27d8c7ab597e2041a58030d3a4 /vcl/win
parentb285eaf5f866b995861c61bd4bfedc9abca2676a (diff)
Cache HarfBuzz font
We now create it only once per physical font, saves us few percents from the all over time spent on layout. Change-Id: I8de582cb20a168c93d72921e539c2477fa97fb54
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/gdi/salfont.cxx6
-rw-r--r--vcl/win/gdi/winlayout.cxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index a832b4596c34..44580ff2f83d 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -866,7 +866,7 @@ WinFontFace::WinFontFace( const FontAttributes& rDFS,
mbAliasSymbolsHigh( false ),
mbAliasSymbolsLow( false ),
mbGsubRead( false ),
- mpHbFace( nullptr )
+ mpHbFont( nullptr )
{
SetBitmapSize( 0, nHeight );
@@ -908,8 +908,8 @@ WinFontFace::~WinFontFace()
#endif // ENABLE_GRAPHITE
delete mpEncodingVector;
- if( mpHbFace )
- hb_face_destroy( mpHbFace );
+ if( mpHbFont )
+ hb_font_destroy( mpHbFont );
}
sal_IntPtr WinFontFace::GetFontId() const
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index fe724e4dbf0f..b036307b8a5a 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -3991,8 +3991,8 @@ PhysicalFontFace* WinFontFace::Clone() const
if ( mpGraphiteData )
mpGraphiteData->AddReference();
#endif
- if( mpHbFace )
- hb_face_reference( mpHbFace );
+ if( mpHbFont )
+ hb_font_reference( mpHbFont );
PhysicalFontFace* pClone = new WinFontFace( *this );
return pClone;