vcl/headless/CairoCommon.cxx                    |    2 ++
 vcl/headless/SvpGraphicsBackend.cxx             |    5 ++++-
 vcl/inc/headless/CairoCommon.hxx                |    1 +
 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx |    5 +++++
 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx |    2 ++
 vcl/unx/generic/gdi/gdiimpl.cxx                 |    5 -----
 vcl/unx/generic/gdi/gdiimpl.hxx                 |    2 --
 7 files changed, 14 insertions(+), 8 deletions(-)

New commits:
commit 4818e7d8d5b99cc9f74985572c113a10f0bbae3b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jan 3 20:21:51 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jan 5 10:49:24 2023 +0000

    move hasFastDrawTransformedBitmap into CairoCommon and reuse
    
    Change-Id: I5c70f657fe885da54caf9514bdddf868e9cf8c1d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145029
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index a43849f18ad1..1b83e20adefa 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -1278,6 +1278,8 @@ cairo_surface_t* CairoCommon::createCairoSurface(const 
BitmapBuffer* pBuffer)
     return target;
 }
 
+bool CairoCommon::hasFastDrawTransformedBitmap() { return false; }
+
 bool CairoCommon::supportsOperation(OutDevSupportType eType)
 {
     switch (eType)
diff --git a/vcl/headless/SvpGraphicsBackend.cxx 
b/vcl/headless/SvpGraphicsBackend.cxx
index 71734759906d..c41c31f4d360 100644
--- a/vcl/headless/SvpGraphicsBackend.cxx
+++ b/vcl/headless/SvpGraphicsBackend.cxx
@@ -815,7 +815,10 @@ bool SvpGraphicsBackend::drawTransformedBitmap(const 
basegfx::B2DPoint& rNull,
     return true;
 }
 
-bool SvpGraphicsBackend::hasFastDrawTransformedBitmap() const { return false; }
+bool SvpGraphicsBackend::hasFastDrawTransformedBitmap() const
+{
+    return CairoCommon::hasFastDrawTransformedBitmap();
+}
 
 bool SvpGraphicsBackend::drawAlphaRect(tools::Long nX, tools::Long nY, 
tools::Long nWidth,
                                        tools::Long nHeight, sal_uInt8 
nTransparency)
diff --git a/vcl/inc/headless/CairoCommon.hxx b/vcl/inc/headless/CairoCommon.hxx
index c0938ef58e3d..35d33e2fd24e 100644
--- a/vcl/inc/headless/CairoCommon.hxx
+++ b/vcl/inc/headless/CairoCommon.hxx
@@ -188,6 +188,7 @@ struct VCL_DLLPUBLIC CairoCommon
     static cairo_surface_t* createCairoSurface(const BitmapBuffer* pBuffer);
 
     static bool supportsOperation(OutDevSupportType eType);
+    static bool hasFastDrawTransformedBitmap();
 
 private:
     void doXorOnRelease(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop, 
sal_Int32 nExtentsRight,
diff --git a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx 
b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx
index 58c5567cdbd4..799327684e85 100644
--- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx
+++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx
@@ -193,6 +193,11 @@ bool 
X11CairoSalGraphicsImpl::implDrawGradient(basegfx::B2DPolyPolygon const& rP
     return bRetval;
 }
 
+bool X11CairoSalGraphicsImpl::hasFastDrawTransformedBitmap() const
+{
+    return CairoCommon::hasFastDrawTransformedBitmap();
+}
+
 bool X11CairoSalGraphicsImpl::supportsOperation(OutDevSupportType eType) const
 {
     return CairoCommon::supportsOperation(eType);
diff --git a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx 
b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
index 853c4cad3252..d450b919d551 100644
--- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
+++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
@@ -100,6 +100,8 @@ public:
     bool implDrawGradient(basegfx::B2DPolyPolygon const& rPolyPolygon,
                           SalGradient const& rGradient) override;
 
+    virtual bool hasFastDrawTransformedBitmap() const override;
+
     virtual bool supportsOperation(OutDevSupportType eType) const override;
 };
 
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index b9ccd388d0f7..d95d65f8d98e 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -852,11 +852,6 @@ bool X11SalGraphicsImpl::drawTransformedBitmap(
     return false;
 }
 
-bool X11SalGraphicsImpl::hasFastDrawTransformedBitmap() const
-{
-    return false;
-}
-
 void X11SalGraphicsImpl::drawMask( const SalTwoRect& rPosAry,
                                const SalBitmap &rSalBitmap,
                                Color nMaskColor )
diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx
index d46e67c1108d..6858f582b1bf 100644
--- a/vcl/unx/generic/gdi/gdiimpl.hxx
+++ b/vcl/unx/generic/gdi/gdiimpl.hxx
@@ -272,8 +272,6 @@ public:
                 const SalBitmap* pAlphaBitmap,
                 double fAlpha) override;
 
-    virtual bool hasFastDrawTransformedBitmap() const override;
-
 public:
     void Init() override;
 };

Reply via email to