[Libreoffice-commits] core.git: vcl/inc vcl/unx
Caolán McNamara
caolanm at redhat.com
Wed Nov 23 15:38:01 UTC 2016
vcl/inc/unx/glyphcache.hxx | 4 +---
vcl/unx/generic/glyphs/glyphcache.cxx | 6 +++---
2 files changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 944f8f8adf6e85b028f03e37f68f067a4eeaafff
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 23 11:56:10 2016 +0000
fold GetGlyphMetric and GetGlyphData together
Change-Id: I12ea240bab223fb62a58a14fecc821e9075fa59e
Reviewed-on: https://gerrit.libreoffice.org/31114
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 1e2d57c..366bd2a 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -168,8 +168,7 @@ public:
const FontCharMapRef GetFontCharMap() const;
bool GetFontCapabilities(vcl::FontCapabilities &) const;
- const GlyphMetric& GetGlyphMetric( sal_GlyphId aGlyphId )
- { return GetGlyphData( aGlyphId ).GetMetric(); }
+ const GlyphMetric& GetGlyphMetric(sal_GlyphId aGlyphId);
#if ENABLE_GRAPHITE
GraphiteFaceWrapper* GetGraphiteFace() const;
@@ -201,7 +200,6 @@ private:
void ApplyGlyphTransform( int nGlyphFlags, FT_GlyphRec_* ) const;
void ApplyGSUB( const FontSelectPattern& );
- GlyphData& GetGlyphData( sal_GlyphId );
ServerFontLayoutEngine* GetLayoutEngine();
diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx
index c1b4a4e..de4bb96 100644
--- a/vcl/unx/generic/glyphs/glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/glyphcache.cxx
@@ -304,14 +304,14 @@ long FreetypeFont::Release() const
return --mnRefCount;
}
-GlyphData& FreetypeFont::GetGlyphData( sal_GlyphId aGlyphId )
+const GlyphMetric& FreetypeFont::GetGlyphMetric(sal_GlyphId aGlyphId)
{
// usually the GlyphData is cached
GlyphList::iterator it = maGlyphList.find( aGlyphId );
if( it != maGlyphList.end() ) {
GlyphData& rGlyphData = it->second;
GlyphCache::GetInstance().UsingGlyph( *this, rGlyphData );
- return rGlyphData;
+ return rGlyphData.GetMetric();
}
// sometimes not => we need to create and initialize it ourselves
@@ -319,7 +319,7 @@ GlyphData& FreetypeFont::GetGlyphData( sal_GlyphId aGlyphId )
mnBytesUsed += sizeof( GlyphData );
InitGlyphData( aGlyphId, rGlyphData );
GlyphCache::GetInstance().AddedGlyph( *this, rGlyphData );
- return rGlyphData;
+ return rGlyphData.GetMetric();
}
void FreetypeFont::GarbageCollect( long nMinLruIndex )
More information about the Libreoffice-commits
mailing list