summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-14 15:20:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-14 15:20:52 +0000
commit5730388b6e8cd1345318afedb00afcfc139287a5 (patch)
tree34187a067d783faf19f93dc2a5619c4ec01896ab /vcl/headless
parentda05c05edef729a2865158db4086b74785c45208 (diff)
undo cairo use in svp for now
seeing as its unavailable for android at the moment Change-Id: Idc4dfd01224a2b90eacce0efd2d1b8a75001d085
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpgdi.cxx23
1 files changed, 16 insertions, 7 deletions
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 8edc059ee79f..fc7d5fa70e0a 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -33,7 +33,9 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basebmp/scanlineformats.hxx>
+#if ENABLE_CAIRO_CANVAS
#include <cairo.h>
+#endif
#if OSL_DEBUG_LEVEL > 2
#include <basebmp/debug.hxx>
@@ -93,6 +95,8 @@ bool SvpSalGraphics::drawTransformedBitmap(
return false;
}
+#if ENABLE_CAIRO_CANVAS
+
namespace
{
bool isCairoCompatible(const basebmp::BitmapDeviceSharedPtr &rBuffer)
@@ -130,15 +134,18 @@ void SvpSalGraphics::clipRegion(cairo_t* cr)
}
}
+#endif
+
bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency)
{
bool bRet = false;
(void)nX; (void)nY; (void)nWidth; (void)nHeight; (void)nTransparency;
+#if ENABLE_CAIRO_CANVAS
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 10, 0)
if (m_bUseLineColor || !m_bUseFillColor)
return bRet;
- cairo_t* cr = getCairoContext();
+ cairo_t* cr = createCairoContext(m_aDevice);
if (!cr)
return bRet;
@@ -188,6 +195,7 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
}
bRet = true;
#endif
+#endif
return bRet;
}
@@ -809,6 +817,8 @@ bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong )
return false;
}
+#if ENABLE_CAIRO_CANVAS
+
cairo_t* SvpSalGraphics::createCairoContext(const basebmp::BitmapDeviceSharedPtr &rBuffer)
{
if (!isCairoCompatible(rBuffer))
@@ -828,12 +838,6 @@ cairo_t* SvpSalGraphics::createCairoContext(const basebmp::BitmapDeviceSharedPtr
return cr;
}
-cairo_t* SvpSalGraphics::getCairoContext() const
-{
- return SvpSalGraphics::createCairoContext(m_aOrigDevice);
-}
-
-#if ENABLE_CAIRO_CANVAS
bool SvpSalGraphics::SupportsCairo() const
{
return false;
@@ -870,9 +874,14 @@ SystemGraphicsData SvpSalGraphics::GetGraphicsData() const
bool SvpSalGraphics::supportsOperation(OutDevSupportType eType) const
{
+#if ENABLE_CAIRO_CANVAS
return m_aDrawMode != basebmp::DrawMode::XOR &&
OutDevSupport_TransparentRect == eType &&
isCairoCompatible(m_aDevice);
+#else
+ (void)eType;
+ return false;
+#endif
}
#endif