summaryrefslogtreecommitdiff
path: root/vcl/headless
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/headless')
-rw-r--r--vcl/headless/svpcairotextrender.cxx22
-rw-r--r--vcl/headless/svpcairotextrender.hxx2
-rw-r--r--vcl/headless/svpgdi.cxx6
-rw-r--r--vcl/headless/svpinst.cxx3
-rw-r--r--vcl/headless/svptext.cxx14
5 files changed, 1 insertions, 46 deletions
diff --git a/vcl/headless/svpcairotextrender.cxx b/vcl/headless/svpcairotextrender.cxx
index 06abf0ccc48a..681d65dd2e5a 100644
--- a/vcl/headless/svpcairotextrender.cxx
+++ b/vcl/headless/svpcairotextrender.cxx
@@ -22,13 +22,7 @@ GlyphCache& SvpCairoTextRender::getPlatformGlyphCache()
cairo_t* SvpCairoTextRender::getCairoContext()
{
- cairo_t* pRet = mrParent.getCairoContext();
- if (!pRet)
- {
- mxTmpSurface = mrParent.createSimpleMask();
- pRet = SvpSalGraphics::createCairoContext(mxTmpSurface);
- }
- return pRet;
+ return mrParent.getCairoContext();
}
void SvpCairoTextRender::getSurfaceOffset(double& nDX, double& nDY)
@@ -42,22 +36,8 @@ void SvpCairoTextRender::clipRegion(cairo_t* cr)
mrParent.clipRegion(cr);
}
-basebmp::BitmapDeviceSharedPtr SvpCairoTextRender::createSimpleMask()
-{
- return mrParent.createSimpleMask();
-}
-
void SvpCairoTextRender::drawSurface(cairo_t*)
{
- //typically we have drawn directly to the real surface, in edge-cases of
- //strange surface depths, we'll have drawn into a tmp surface, so flush
- //it
- if (mxTmpSurface)
- {
- // blend text color into target using the glyph's mask
- mrParent.BlendTextColor(basebmp::Color(GetTextColor()), mxTmpSurface, basegfx::B2IPoint(0, 0));
- mxTmpSurface.reset();
- }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpcairotextrender.hxx b/vcl/headless/svpcairotextrender.hxx
index daae42c51842..1a0a1ec3b871 100644
--- a/vcl/headless/svpcairotextrender.hxx
+++ b/vcl/headless/svpcairotextrender.hxx
@@ -17,7 +17,6 @@ class SvpSalGraphics;
class SvpCairoTextRender : public CairoTextRender
{
protected:
- basebmp::BitmapDeviceSharedPtr mxTmpSurface;
SvpSalGraphics& mrParent;
public:
@@ -28,7 +27,6 @@ public:
virtual void getSurfaceOffset(double& nDX, double& nDY) override;
virtual void clipRegion(cairo_t* cr) override;
virtual void drawSurface(cairo_t* cr) override;
- virtual basebmp::BitmapDeviceSharedPtr createSimpleMask() override;
};
#endif
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 05e673cda733..1fd0820e1dd4 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -122,12 +122,6 @@ namespace
#endif
-basebmp::BitmapDeviceSharedPtr SvpSalGraphics::createSimpleMask() const
-{
- return basebmp::createBitmapDevice(m_aOrigDevice->getSize(), true, basebmp::Format::OneBitLsbGrey,
- cairo_format_stride_for_width(CAIRO_FORMAT_A1, m_aOrigDevice->getSize().getX()));
-}
-
void SvpSalGraphics::clipRegion(cairo_t* cr)
{
RectangleVector aRectangles;
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index fe381fb16a04..ec7039a315e0 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -446,12 +446,9 @@ Format SvpSalInstance::getBaseBmpFormatForDeviceFormat(DeviceFormat eFormat)
{
case DeviceFormat::BITMASK:
return Format::OneBitMsbPal;
- case DeviceFormat::GRAYSCALE:
- return Format::EightBitPal;
default:
return SVP_CAIRO_FORMAT;
}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 9eb39f263b69..cb6720ca0cd9 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -133,18 +133,4 @@ SystemFontData SvpSalGraphics::GetSysFontData( int nFallbacklevel ) const
#endif // ENABLE_CAIRO_CANVAS
-void SvpSalGraphics::BlendTextColor(const basebmp::Color &rTextColor, const basebmp::BitmapDeviceSharedPtr &rAlphaMask,
- const basegfx::B2IPoint &rDstPoint)
-{
- // blend text color into target using the glyph's mask
- const basegfx::B2IBox aSrcRect(basegfx::B2ITuple(0,0), rAlphaMask->getSize());
- const basegfx::B2IBox aClipRect(rDstPoint, rAlphaMask->getSize());
-
- SvpSalGraphics::ClipUndoHandle aUndo(this);
- if (isClippedSetup(aClipRect, aUndo))
- return;
-
- m_aDevice->drawMaskedColor(rTextColor, rAlphaMask, aSrcRect, rDstPoint, m_aClipMap);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */