summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2016-05-16 14:56:23 +0200
committerJan Holesovsky <kendy@collabora.com>2016-05-16 14:57:01 +0200
commita1ea62d0515fcd992eaf4df0f6ee3d3c9e0cdfd6 (patch)
tree2abc3547a0498d6d04ad40fb8c03e9ed2017ff7a
parent449434d82dbdfa0922a1914fedbab72e7ba8a973 (diff)
cairo svp: Now it finally builds.
Change-Id: Ifc65e1fb378c49be5d2588f29530fbc670d15523
-rw-r--r--vcl/Library_vcl.mk2
-rw-r--r--vcl/headless/svpgdi.cxx4
-rw-r--r--vcl/headless/svpglyphcache.cxx15
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx12
4 files changed, 22 insertions, 11 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 0f2bd28e1fd8..ac4d3083f796 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -566,6 +566,8 @@ vcl_headless_code= \
vcl_headless_freetype_code=\
vcl/headless/svpprn \
vcl/headless/svptext \
+ vcl/headless/svpglyphcache \
+ vcl/headless/svpcairotextrender \
ifeq ($(GUIBASE),unx)
$(eval $(call gb_Library_add_exception_objects,vcl,\
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 17133ff80a2d..cf3003e98ccb 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1165,7 +1165,7 @@ void SvpSalGraphics::invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags)
SAL_WARN("vcl.gdi", "SvpSalGraphics::invert, archaic cairo");
}
- if (nFlags & SAL_INVERT_TrackFrame)
+ if (nFlags & SAL_INVERT_TRACKFRAME)
{
cairo_set_line_width(cr, 2.0);
const double dashLengths[2] = { 4.0, 4.0 };
@@ -1181,7 +1181,7 @@ void SvpSalGraphics::invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags)
cairo_clip(cr);
- if (nFlags & SAL_INVERT_N50)
+ if (nFlags & SAL_INVERT_50)
{
cairo_pattern_t *pattern = create_stipple();
cairo_mask(cr, pattern);
diff --git a/vcl/headless/svpglyphcache.cxx b/vcl/headless/svpglyphcache.cxx
index f1af1e6a62c0..833e750c66a4 100644
--- a/vcl/headless/svpglyphcache.cxx
+++ b/vcl/headless/svpglyphcache.cxx
@@ -24,20 +24,28 @@
#include <rtl/instance.hxx>
#include <tools/debug.hxx>
-#include "unx/geninst.h"
-#include "unx/glyphcache.hxx"
+#include "generic/geninst.h"
+#include "generic/glyphcache.hxx"
#include "headless/svpgdi.hxx"
+class SvpGlyphPeer : public GlyphCachePeer
+{
+public:
+ SvpGlyphPeer() {}
+};
+
namespace
{
struct GlyphCacheHolder
{
private:
+ SvpGlyphPeer* m_pSvpGlyphPeer;
GlyphCache* m_pSvpGlyphCache;
public:
GlyphCacheHolder()
{
- m_pSvpGlyphCache = new GlyphCache;
+ m_pSvpGlyphPeer = new SvpGlyphPeer();
+ m_pSvpGlyphCache = new GlyphCache( *m_pSvpGlyphPeer );
}
GlyphCache& getGlyphCache()
{
@@ -46,6 +54,7 @@ namespace
~GlyphCacheHolder()
{
delete m_pSvpGlyphCache;
+ delete m_pSvpGlyphPeer;
}
};
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index deaad22afd13..c2b914afaadb 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -410,8 +410,8 @@ void CairoTextRender::GetDevFontList( PhysicalFontCollection* pFontCollection )
int nFaceNum = rMgr.getFontFaceNumber( aInfo.m_nID );
// inform GlyphCache about this font provided by the PsPrint subsystem
- ImplFontAttributes aDFA = GenPspGraphics::Info2FontAttributes( aInfo );
- aDFA.IncreaseQualityBy( 4096 );
+ ImplDevFontAttributes aDFA = GenPspGraphics::Info2DevFontAttributes( aInfo );
+ aDFA.mnQuality += 4096;
const OString& rFileName = rMgr.getFontFileSysPath( aInfo.m_nID );
rGC.AddFontFile( rFileName, nFaceNum, aInfo.m_nID, aDFA );
}
@@ -434,12 +434,12 @@ void cairosubcallback(void* pPattern)
cairo_ft_font_options_substitute(pFontOptions, static_cast<FcPattern*>(pPattern));
}
-FontConfigFontOptions* GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize)
+ImplFontOptions* GetFCFontOptions( const ImplFontAttributes& rFontAttributes, int nSize)
{
psp::FastPrintFontInfo aInfo;
aInfo.m_aFamilyName = rFontAttributes.GetFamilyName();
- aInfo.m_eItalic = rFontAttributes.GetItalic();
+ aInfo.m_eItalic = rFontAttributes.GetSlant();
aInfo.m_eWeight = rFontAttributes.GetWeight();
aInfo.m_eWidth = rFontAttributes.GetWidthType();
@@ -447,7 +447,7 @@ FontConfigFontOptions* GetFCFontOptions( const ImplFontAttributes& rFontAttribut
}
void
-CairoTextRender::GetFontMetric( ImplFontMetricDataPtr& rxFontMetric, int nFallbackLevel )
+CairoTextRender::GetFontMetric( ImplFontMetricData* rxFontMetric, int nFallbackLevel )
{
if( nFallbackLevel >= MAX_FALLBACK )
return;
@@ -455,7 +455,7 @@ CairoTextRender::GetFontMetric( ImplFontMetricDataPtr& rxFontMetric, int nFallba
if( mpServerFont[nFallbackLevel] != nullptr )
{
long rDummyFactor;
- mpServerFont[nFallbackLevel]->GetFontMetric( rxFontMetric, rDummyFactor );
+ mpServerFont[nFallbackLevel]->FetchFontMetric( *rxFontMetric, rDummyFactor );
}
}