summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi/salgdi.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/gdi/salgdi.cxx')
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 2cfe4058a224..680a1f6a57b8 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -58,8 +58,10 @@
#include <textrender.hxx>
#include "gdiimpl.hxx"
#include <opengl/x11/gdiimpl.hxx>
+#include <skia/x11/gdiimpl.hxx>
#include "x11cairotextrender.hxx"
#include "openglx11cairotextrender.hxx"
+#include "skiax11cairotextrender.hxx"
#include <unx/printergfx.hxx>
#include <unx/x11/xrender_peer.hxx>
@@ -67,6 +69,7 @@
#include <cairo-xlib.h>
#include <vcl/opengl/OpenGLHelper.hxx>
+#include <vcl/skia/SkiaHelper.hxx>
X11SalGraphics::X11SalGraphics():
m_pFrame(nullptr),
@@ -88,9 +91,15 @@ X11SalGraphics::X11SalGraphics():
bWindow_(false),
bVirDev_(false),
bFontGC_(false),
- m_bOpenGL(OpenGLHelper::isVCLOpenGLEnabled())
+ m_bOpenGL(OpenGLHelper::isVCLOpenGLEnabled()),
+ m_bSkia(SkiaHelper::isVCLSkiaEnabled())
{
- if (m_bOpenGL)
+ if (m_bSkia)
+ {
+ mxImpl.reset(new X11SkiaSalGraphicsImpl(*this));
+ mxTextRenderImpl.reset(new SkiaX11CairoTextRender(*this));
+ }
+ else if (m_bOpenGL)
{
mxImpl.reset(new X11OpenGLSalGraphicsImpl(*this));
mxTextRenderImpl.reset(new OpenGLX11CairoTextRender(*this));
@@ -605,7 +614,7 @@ bool X11SalGraphics::drawPolyPolygon(
// enable by setting to something
static const char* pUseCairoForPolygons(getenv("SAL_ENABLE_USE_CAIRO_FOR_POLYGONS"));
- if (!m_bOpenGL && nullptr != pUseCairoForPolygons && SupportsCairo())
+ if (!m_bOpenGL && !m_bSkia && nullptr != pUseCairoForPolygons && SupportsCairo())
{
// snap to raster if requested
const bool bSnapPoints(!getAntiAliasB2DDraw());
@@ -725,7 +734,7 @@ bool X11SalGraphics::drawPolyLine(
// disable by setting to something
static const char* pUseCairoForFatLines(getenv("SAL_DISABLE_USE_CAIRO_FOR_FATLINES"));
- if (!m_bOpenGL && nullptr == pUseCairoForFatLines && SupportsCairo())
+ if (!m_bOpenGL && !m_bSkia && nullptr == pUseCairoForFatLines && SupportsCairo())
{
cairo_t* cr = getCairoContext();
clipRegion(cr);