summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-12-30 00:14:26 +0900
committerTomaž Vajngerl <quikee@gmail.com>2022-01-05 04:36:06 +0100
commit581bed6233f31ec5eafb1231fcb93bc3f583f9cb (patch)
tree8a531ab1fea1b2aad4c0336bab68b537b3dee6f8
parent86fdd581a832c7476d7556f3f4fb7d83f5de4d8b (diff)
vcl: move drawBitmap, drawMask functions to SvpGraphicsBackend
Also fix the QTSvpGraphics that uses a special drawBitmap (renamed to drawBitmapBuffer) call and moved in also to SvpGraphicsBackend. Change-Id: Ic50630ba23e35a62ea3d5aaa0955a7666f2bca68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127980 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--vcl/headless/SvpGraphicsBackend.cxx177
-rw-r--r--vcl/headless/svpgdi.cxx185
-rw-r--r--vcl/inc/headless/SvpGraphicsBackend.hxx3
-rw-r--r--vcl/inc/headless/svpgdi.hxx13
-rw-r--r--vcl/qt5/QtSvpGraphics.cxx3
5 files changed, 175 insertions, 206 deletions
diff --git a/vcl/headless/SvpGraphicsBackend.cxx b/vcl/headless/SvpGraphicsBackend.cxx
index 71670cb37bd1..c67f19d5665d 100644
--- a/vcl/headless/SvpGraphicsBackend.cxx
+++ b/vcl/headless/SvpGraphicsBackend.cxx
@@ -23,6 +23,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <vcl/BitmapTools.hxx>
+#include <headless/BitmapHelper.hxx>
SvpGraphicsBackend::SvpGraphicsBackend(CairoCommon& rCairoCommon)
: m_rCairoCommon(rCairoCommon)
@@ -380,18 +381,103 @@ void SvpGraphicsBackend::copyBits(const SalTwoRect& rTR, SalGraphics* pSrcGraphi
m_rCairoCommon.copyBitsCairo(rTR, source, getAntiAlias());
}
-void SvpGraphicsBackend::drawBitmap(const SalTwoRect& /*rPosAry*/, const SalBitmap& /*rSalBitmap*/)
+void SvpGraphicsBackend::drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap)
{
+ // MM02 try to access buffered BitmapHelper
+ std::shared_ptr<BitmapHelper> aSurface;
+ tryToUseSourceBuffer(rSalBitmap, aSurface);
+ cairo_surface_t* source = aSurface->getSurface(rPosAry.mnDestWidth, rPosAry.mnDestHeight);
+
+ if (!source)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
+ return;
+ }
+
+#if 0 // LO code is not yet bitmap32-ready. \
+ // if m_bSupportsBitmap32 becomes true for Svp revisit this
+ m_rCairoCommon.copyWithOperator(rPosAry, source, CAIRO_OPERATOR_OVER, getAntiAlias());
+#else
+ m_rCairoCommon.copyWithOperator(rPosAry, source, CAIRO_OPERATOR_SOURCE, getAntiAlias());
+#endif
}
-void SvpGraphicsBackend::drawBitmap(const SalTwoRect& /*rPosAry*/, const SalBitmap& /*rSalBitmap*/,
- const SalBitmap& /*rMaskBitmap*/)
+void SvpGraphicsBackend::drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
+ const SalBitmap& rTransparentBitmap)
{
+ drawAlphaBitmap(rPosAry, rSalBitmap, rTransparentBitmap);
}
-void SvpGraphicsBackend::drawMask(const SalTwoRect& /*rPosAry*/, const SalBitmap& /*rSalBitmap*/,
- Color /*nMaskColor*/)
+void SvpGraphicsBackend::drawMask(const SalTwoRect& rTR, const SalBitmap& rSalBitmap,
+ Color nMaskColor)
{
+ /** creates an image from the given rectangle, replacing all black pixels
+ * with nMaskColor and make all other full transparent */
+ // MM02 here decided *against* using buffered BitmapHelper
+ // because the data gets somehow 'unmuliplied'. This may also be
+ // done just once, but I am not sure if this is safe to do.
+ // So for now dispense re-using data here.
+ BitmapHelper aSurface(rSalBitmap, true); // The mask is argb32
+ if (!aSurface.getSurface())
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawMask case");
+ return;
+ }
+ sal_Int32 nStride;
+ unsigned char* mask_data = aSurface.getBits(nStride);
+ vcl::bitmap::lookup_table const& unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
+ for (tools::Long y = rTR.mnSrcY; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y)
+ {
+ unsigned char* row = mask_data + (nStride * y);
+ unsigned char* data = row + (rTR.mnSrcX * 4);
+ for (tools::Long x = rTR.mnSrcX; x < rTR.mnSrcX + rTR.mnSrcWidth; ++x)
+ {
+ sal_uInt8 a = data[SVP_CAIRO_ALPHA];
+ sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]];
+ sal_uInt8 g = unpremultiply_table[a][data[SVP_CAIRO_GREEN]];
+ sal_uInt8 r = unpremultiply_table[a][data[SVP_CAIRO_RED]];
+ if (r == 0 && g == 0 && b == 0)
+ {
+ data[0] = nMaskColor.GetBlue();
+ data[1] = nMaskColor.GetGreen();
+ data[2] = nMaskColor.GetRed();
+ data[3] = 0xff;
+ }
+ else
+ {
+ data[0] = 0;
+ data[1] = 0;
+ data[2] = 0;
+ data[3] = 0;
+ }
+ data += 4;
+ }
+ }
+ aSurface.mark_dirty();
+
+ cairo_t* cr = m_rCairoCommon.getCairoContext(false, getAntiAlias());
+ m_rCairoCommon.clipRegion(cr);
+
+ cairo_rectangle(cr, rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight);
+
+ basegfx::B2DRange extents = getClippedFillDamage(cr);
+
+ cairo_clip(cr);
+
+ cairo_translate(cr, rTR.mnDestX, rTR.mnDestY);
+ double fXScale = static_cast<double>(rTR.mnDestWidth) / rTR.mnSrcWidth;
+ double fYScale = static_cast<double>(rTR.mnDestHeight) / rTR.mnSrcHeight;
+ cairo_scale(cr, fXScale, fYScale);
+ cairo_set_source_surface(cr, aSurface.getSurface(), -rTR.mnSrcX, -rTR.mnSrcY);
+ if ((fXScale != 1.0 && rTR.mnSrcWidth == 1) || (fYScale != 1.0 && rTR.mnSrcHeight == 1))
+ {
+ cairo_pattern_t* sourcepattern = cairo_get_source(cr);
+ cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_REPEAT);
+ cairo_pattern_set_filter(sourcepattern, CAIRO_FILTER_NEAREST);
+ }
+ cairo_paint(cr);
+
+ m_rCairoCommon.releaseCairoContext(cr, false, extents);
}
std::shared_ptr<SalBitmap> SvpGraphicsBackend::getBitmap(tools::Long /*nX*/, tools::Long /*nY*/,
@@ -401,6 +487,14 @@ std::shared_ptr<SalBitmap> SvpGraphicsBackend::getBitmap(tools::Long /*nX*/, too
return std::shared_ptr<SalBitmap>();
}
+void SvpGraphicsBackend::drawBitmapBuffer(const SalTwoRect& rTR, const BitmapBuffer* pBuffer,
+ cairo_operator_t eOp)
+{
+ cairo_surface_t* source = CairoCommon::createCairoSurface(pBuffer);
+ m_rCairoCommon.copyWithOperator(rTR, source, eOp, getAntiAlias());
+ cairo_surface_destroy(source);
+}
+
Color SvpGraphicsBackend::getPixel(tools::Long nX, tools::Long nY)
{
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
@@ -469,10 +563,77 @@ bool SvpGraphicsBackend::blendAlphaBitmap(const SalTwoRect& /*rPosAry*/,
return false;
}
-bool SvpGraphicsBackend::drawAlphaBitmap(const SalTwoRect&, const SalBitmap& /*rSourceBitmap*/,
- const SalBitmap& /*rAlphaBitmap*/)
+bool SvpGraphicsBackend::drawAlphaBitmap(const SalTwoRect& rTR, const SalBitmap& rSourceBitmap,
+ const SalBitmap& rAlphaBitmap)
{
- return false;
+ if (rAlphaBitmap.GetBitCount() != 8 && rAlphaBitmap.GetBitCount() != 1)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap alpha depth case: "
+ << rAlphaBitmap.GetBitCount());
+ return false;
+ }
+
+ // MM02 try to access buffered BitmapHelper
+ std::shared_ptr<BitmapHelper> aSurface;
+ tryToUseSourceBuffer(rSourceBitmap, aSurface);
+ cairo_surface_t* source = aSurface->getSurface(rTR.mnDestWidth, rTR.mnDestHeight);
+
+ if (!source)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
+ return false;
+ }
+
+ // MM02 try to access buffered MaskHelper
+ std::shared_ptr<MaskHelper> aMask;
+ tryToUseMaskBuffer(rAlphaBitmap, aMask);
+ cairo_surface_t* mask = aMask->getSurface(rTR.mnDestWidth, rTR.mnDestHeight);
+
+ if (!mask)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
+ return false;
+ }
+
+ cairo_t* cr = m_rCairoCommon.getCairoContext(false, getAntiAlias());
+ m_rCairoCommon.clipRegion(cr);
+
+ cairo_rectangle(cr, rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight);
+
+ basegfx::B2DRange extents = getClippedFillDamage(cr);
+
+ cairo_clip(cr);
+
+ cairo_pattern_t* maskpattern = cairo_pattern_create_for_surface(mask);
+ cairo_translate(cr, rTR.mnDestX, rTR.mnDestY);
+ double fXScale = static_cast<double>(rTR.mnDestWidth) / rTR.mnSrcWidth;
+ double fYScale = static_cast<double>(rTR.mnDestHeight) / rTR.mnSrcHeight;
+ cairo_scale(cr, fXScale, fYScale);
+ cairo_set_source_surface(cr, source, -rTR.mnSrcX, -rTR.mnSrcY);
+
+ //tdf#114117 when stretching a single pixel width/height source to fit an area
+ //set extend and filter to stretch it with simplest expected interpolation
+ if ((fXScale != 1.0 && rTR.mnSrcWidth == 1) || (fYScale != 1.0 && rTR.mnSrcHeight == 1))
+ {
+ cairo_pattern_t* sourcepattern = cairo_get_source(cr);
+ cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_REPEAT);
+ cairo_pattern_set_filter(sourcepattern, CAIRO_FILTER_NEAREST);
+ cairo_pattern_set_extend(maskpattern, CAIRO_EXTEND_REPEAT);
+ cairo_pattern_set_filter(maskpattern, CAIRO_FILTER_NEAREST);
+ }
+
+ //this block is just "cairo_mask_surface", but we have to make it explicit
+ //because of the cairo_pattern_set_filter etc we may want applied
+ cairo_matrix_t matrix;
+ cairo_matrix_init_translate(&matrix, rTR.mnSrcX, rTR.mnSrcY);
+ cairo_pattern_set_matrix(maskpattern, &matrix);
+ cairo_mask(cr, maskpattern);
+
+ cairo_pattern_destroy(maskpattern);
+
+ m_rCairoCommon.releaseCairoContext(cr, false, extents);
+
+ return true;
}
bool SvpGraphicsBackend::drawTransformedBitmap(const basegfx::B2DPoint& /*rNull*/,
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 04849793efd9..556f85f568e3 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -57,81 +57,6 @@
# endif
#endif
-bool SvpSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, const SalBitmap& rSourceBitmap, const SalBitmap& rAlphaBitmap )
-{
- if (rAlphaBitmap.GetBitCount() != 8 && rAlphaBitmap.GetBitCount() != 1)
- {
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap alpha depth case: " << rAlphaBitmap.GetBitCount());
- return false;
- }
-
- // MM02 try to access buffered BitmapHelper
- std::shared_ptr<BitmapHelper> aSurface;
- tryToUseSourceBuffer(rSourceBitmap, aSurface);
- cairo_surface_t* source = aSurface->getSurface(
- rTR.mnDestWidth,
- rTR.mnDestHeight);
-
- if (!source)
- {
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
- return false;
- }
-
- // MM02 try to access buffered MaskHelper
- std::shared_ptr<MaskHelper> aMask;
- tryToUseMaskBuffer(rAlphaBitmap, aMask);
- cairo_surface_t *mask = aMask->getSurface(
- rTR.mnDestWidth,
- rTR.mnDestHeight);
-
- if (!mask)
- {
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
- return false;
- }
-
- cairo_t* cr = m_aCairoCommon.getCairoContext(false, getAntiAlias());
- clipRegion(cr);
-
- cairo_rectangle(cr, rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight);
-
- basegfx::B2DRange extents = getClippedFillDamage(cr);
-
- cairo_clip(cr);
-
- cairo_pattern_t* maskpattern = cairo_pattern_create_for_surface(mask);
- cairo_translate(cr, rTR.mnDestX, rTR.mnDestY);
- double fXScale = static_cast<double>(rTR.mnDestWidth)/rTR.mnSrcWidth;
- double fYScale = static_cast<double>(rTR.mnDestHeight)/rTR.mnSrcHeight;
- cairo_scale(cr, fXScale, fYScale);
- cairo_set_source_surface(cr, source, -rTR.mnSrcX, -rTR.mnSrcY);
-
- //tdf#114117 when stretching a single pixel width/height source to fit an area
- //set extend and filter to stretch it with simplest expected interpolation
- if ((fXScale != 1.0 && rTR.mnSrcWidth == 1) || (fYScale != 1.0 && rTR.mnSrcHeight == 1))
- {
- cairo_pattern_t* sourcepattern = cairo_get_source(cr);
- cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_REPEAT);
- cairo_pattern_set_filter(sourcepattern, CAIRO_FILTER_NEAREST);
- cairo_pattern_set_extend(maskpattern, CAIRO_EXTEND_REPEAT);
- cairo_pattern_set_filter(maskpattern, CAIRO_FILTER_NEAREST);
- }
-
- //this block is just "cairo_mask_surface", but we have to make it explicit
- //because of the cairo_pattern_set_filter etc we may want applied
- cairo_matrix_t matrix;
- cairo_matrix_init_translate(&matrix, rTR.mnSrcX, rTR.mnSrcY);
- cairo_pattern_set_matrix(maskpattern, &matrix);
- cairo_mask(cr, maskpattern);
-
- cairo_pattern_destroy(maskpattern);
-
- m_aCairoCommon.releaseCairoContext(cr, false, extents);
-
- return true;
-}
-
bool SvpSalGraphics::drawTransformedBitmap(
const basegfx::B2DPoint& rNull,
const basegfx::B2DPoint& rX,
@@ -244,116 +169,6 @@ void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
rDPIX = rDPIY = 96;
}
-void SvpSalGraphics::drawBitmap(const SalTwoRect& rTR, const SalBitmap& rSourceBitmap)
-{
- // MM02 try to access buffered BitmapHelper
- std::shared_ptr<BitmapHelper> aSurface;
- tryToUseSourceBuffer(rSourceBitmap, aSurface);
- cairo_surface_t* source = aSurface->getSurface(
- rTR.mnDestWidth,
- rTR.mnDestHeight);
-
- if (!source)
- {
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
- return;
- }
-
-#if 0 // LO code is not yet bitmap32-ready.
- // if m_bSupportsBitmap32 becomes true for Svp revisit this
- m_aCairoCommon.copyWithOperator(rTR, source, CAIRO_OPERATOR_OVER, getAntiAlias());
-#else
- m_aCairoCommon.copyWithOperator(rTR, source, CAIRO_OPERATOR_SOURCE, getAntiAlias());
-#endif
-}
-
-void SvpSalGraphics::drawBitmap(const SalTwoRect& rTR, const BitmapBuffer* pBuffer, cairo_operator_t eOp)
-{
- cairo_surface_t* source = CairoCommon::createCairoSurface(pBuffer);
- m_aCairoCommon.copyWithOperator(rTR, source, eOp, getAntiAlias());
- cairo_surface_destroy(source);
-}
-
-void SvpSalGraphics::drawBitmap( const SalTwoRect& rTR,
- const SalBitmap& rSourceBitmap,
- const SalBitmap& rTransparentBitmap )
-{
- drawAlphaBitmap(rTR, rSourceBitmap, rTransparentBitmap);
-}
-
-void SvpSalGraphics::drawMask( const SalTwoRect& rTR,
- const SalBitmap& rSalBitmap,
- Color nMaskColor )
-{
- /** creates an image from the given rectangle, replacing all black pixels
- * with nMaskColor and make all other full transparent */
- // MM02 here decided *against* using buffered BitmapHelper
- // because the data gets somehow 'unmuliplied'. This may also be
- // done just once, but I am not sure if this is safe to do.
- // So for now dispense re-using data here.
- BitmapHelper aSurface(rSalBitmap, true); // The mask is argb32
- if (!aSurface.getSurface())
- {
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawMask case");
- return;
- }
- sal_Int32 nStride;
- unsigned char *mask_data = aSurface.getBits(nStride);
- vcl::bitmap::lookup_table const & unpremultiply_table = vcl::bitmap::get_unpremultiply_table();
- for (tools::Long y = rTR.mnSrcY ; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y)
- {
- unsigned char *row = mask_data + (nStride*y);
- unsigned char *data = row + (rTR.mnSrcX * 4);
- for (tools::Long x = rTR.mnSrcX; x < rTR.mnSrcX + rTR.mnSrcWidth; ++x)
- {
- sal_uInt8 a = data[SVP_CAIRO_ALPHA];
- sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]];
- sal_uInt8 g = unpremultiply_table[a][data[SVP_CAIRO_GREEN]];
- sal_uInt8 r = unpremultiply_table[a][data[SVP_CAIRO_RED]];
- if (r == 0 && g == 0 && b == 0)
- {
- data[0] = nMaskColor.GetBlue();
- data[1] = nMaskColor.GetGreen();
- data[2] = nMaskColor.GetRed();
- data[3] = 0xff;
- }
- else
- {
- data[0] = 0;
- data[1] = 0;
- data[2] = 0;
- data[3] = 0;
- }
- data+=4;
- }
- }
- aSurface.mark_dirty();
-
- cairo_t* cr = m_aCairoCommon.getCairoContext(false, getAntiAlias());
- clipRegion(cr);
-
- cairo_rectangle(cr, rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight);
-
- basegfx::B2DRange extents = getClippedFillDamage(cr);
-
- cairo_clip(cr);
-
- cairo_translate(cr, rTR.mnDestX, rTR.mnDestY);
- double fXScale = static_cast<double>(rTR.mnDestWidth)/rTR.mnSrcWidth;
- double fYScale = static_cast<double>(rTR.mnDestHeight)/rTR.mnSrcHeight;
- cairo_scale(cr, fXScale, fYScale);
- cairo_set_source_surface(cr, aSurface.getSurface(), -rTR.mnSrcX, -rTR.mnSrcY);
- if ((fXScale != 1.0 && rTR.mnSrcWidth == 1) || (fYScale != 1.0 && rTR.mnSrcHeight == 1))
- {
- cairo_pattern_t* sourcepattern = cairo_get_source(cr);
- cairo_pattern_set_extend(sourcepattern, CAIRO_EXTEND_REPEAT);
- cairo_pattern_set_filter(sourcepattern, CAIRO_FILTER_NEAREST);
- }
- cairo_paint(cr);
-
- m_aCairoCommon.releaseCairoContext(cr, false, extents);
-}
-
std::shared_ptr<SalBitmap> SvpSalGraphics::getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight )
{
std::shared_ptr<SvpSalBitmap> pBitmap = std::make_shared<SvpSalBitmap>();
diff --git a/vcl/inc/headless/SvpGraphicsBackend.hxx b/vcl/inc/headless/SvpGraphicsBackend.hxx
index e927ad9b684b..16f9213576fd 100644
--- a/vcl/inc/headless/SvpGraphicsBackend.hxx
+++ b/vcl/inc/headless/SvpGraphicsBackend.hxx
@@ -131,6 +131,9 @@ public:
SalGradient const& rGradient) override;
bool supportsOperation(OutDevSupportType eType) const override;
+
+ void drawBitmapBuffer(const SalTwoRect& rPosAry, const BitmapBuffer* pBuffer,
+ cairo_operator_t eOp);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 0f747fe99af2..d2196c78a230 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -59,7 +59,6 @@ protected:
std::unique_ptr<SvpGraphicsBackend> m_pBackend;
protected:
- virtual bool drawAlphaBitmap( const SalTwoRect&, const SalBitmap& rSourceBitmap, const SalBitmap& rAlphaBitmap ) override;
virtual bool drawTransformedBitmap(
const basegfx::B2DPoint& rNull,
const basegfx::B2DPoint& rX,
@@ -75,6 +74,7 @@ public:
virtual ~SvpSalGraphics() override;
virtual SalGraphicsImpl* GetImpl() const override { return m_pBackend.get(); }
+ std::unique_ptr<SvpGraphicsBackend> const& getSvpBackend() { return m_pBackend; }
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
@@ -104,17 +104,6 @@ public:
GetTextLayout(int nFallbackLevel) override;
virtual void DrawTextLayout( const GenericSalLayout& ) override;
- virtual void drawBitmap( const SalTwoRect& rPosAry,
- const SalBitmap& rSalBitmap ) override;
- void drawBitmap( const SalTwoRect& rPosAry,
- const BitmapBuffer* pBuffer,
- cairo_operator_t eOp );
- virtual void drawBitmap( const SalTwoRect& rPosAry,
- const SalBitmap& rSalBitmap,
- const SalBitmap& rTransparentBitmap ) override;
- virtual void drawMask( const SalTwoRect& rPosAry,
- const SalBitmap& rSalBitmap,
- Color nMaskColor ) override;
virtual std::shared_ptr<SalBitmap> getBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight ) override;
virtual SystemGraphicsData GetGraphicsData() const override;
diff --git a/vcl/qt5/QtSvpGraphics.cxx b/vcl/qt5/QtSvpGraphics.cxx
index 3632c8990706..8ae869a1c247 100644
--- a/vcl/qt5/QtSvpGraphics.cxx
+++ b/vcl/qt5/QtSvpGraphics.cxx
@@ -89,7 +89,8 @@ void QtSvpGraphics::handleDamage(const tools::Rectangle& rDamagedRegion)
QImage2BitmapBuffer(*pImage, aBuffer);
SalTwoRect aTR(0, 0, pImage->width(), pImage->height(), rDamagedRegion.Left(),
rDamagedRegion.Top(), rDamagedRegion.GetWidth(), rDamagedRegion.GetHeight());
- drawBitmap(aTR, &aBuffer, CAIRO_OPERATOR_OVER);
+
+ getSvpBackend()->drawBitmapBuffer(aTR, &aBuffer, CAIRO_OPERATOR_OVER);
}
void QtSvpGraphics::GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY)