[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/headless vcl/inc
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Tue Aug 18 16:08:02 UTC 2020
vcl/headless/svpinst.cxx | 23 ++++++++++++++++++-----
vcl/inc/headless/svpinst.hxx | 2 ++
2 files changed, 20 insertions(+), 5 deletions(-)
New commits:
commit 985922fe1a5dfd9ce02f7d24c4083d9d69544951
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Aug 17 19:57:58 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Aug 18 18:07:29 2020 +0200
headless: don't allow the system to set subpixel rendering eg.
Change-Id: Id62c03938c88d70dabda6111b8a7cca3b175e31f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100875
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 3b921af90c26..6ff536926829 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -44,11 +44,12 @@
#include <headless/svpdummies.hxx>
#include <headless/svpvd.hxx>
#ifdef IOS
-#include <quartz/salbmp.h>
-#include <quartz/salgdi.h>
-#include <quartz/salvd.h>
+# include <quartz/salbmp.h>
+# include <quartz/salgdi.h>
+# include <quartz/salvd.h>
#else
-#include <headless/svpgdi.hxx>
+# include <cairo.h>
+# include <headless/svpgdi.hxx>
#endif
#include <headless/svpbmp.hxx>
@@ -267,6 +268,19 @@ cairo_surface_t* get_underlying_cairo_surface(const VirtualDevice& rDevice)
return static_cast<SvpSalVirtualDevice*>(rDevice.mpVirDev.get())->GetSurface();
}
+const cairo_font_options_t* SvpSalInstance::GetCairoFontOptions()
+{
+ static cairo_font_options_t *gOptions = nullptr;
+#ifndef IOS
+ if (!gOptions)
+ {
+ gOptions = cairo_font_options_create();
+ cairo_font_options_set_antialias(gOptions, CAIRO_ANTIALIAS_GRAY);
+ }
+#endif
+ return gOptions;
+}
+
#endif
SalTimer* SvpSalInstance::CreateSalTimer()
@@ -604,7 +618,6 @@ OpenGLContext* SvpSalInstance::CreateOpenGLContext()
return nullptr;
}
-
#endif
SvpSalTimer::~SvpSalTimer()
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index 04e4de84cad7..a9d630a735ee 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -177,6 +177,8 @@ public:
virtual void AddToRecentDocumentList(const OUString& rFileUrl, const OUString& rMimeType, const OUString& rDocumentService) override;
virtual std::unique_ptr<GenPspGraphics> CreatePrintGraphics() override;
+
+ virtual const cairo_font_options_t* GetCairoFontOptions() override;
};
inline void SvpSalInstance::registerFrame( SalFrame* pFrame )
More information about the Libreoffice-commits
mailing list