vcl/headless/CairoCommon.cxx                    |    2 --
 vcl/headless/SvpGraphicsBackend.cxx             |    5 -----
 vcl/inc/headless/CairoCommon.hxx                |    1 -
 vcl/inc/headless/SvpGraphicsBackend.hxx         |    2 --
 vcl/inc/qt5/QtGraphics.hxx                      |    2 --
 vcl/inc/quartz/salgdi.h                         |    2 --
 vcl/inc/salgdi.hxx                              |    3 ++-
 vcl/inc/salgdiimpl.hxx                          |    3 ++-
 vcl/qt5/QtGraphics_GDI.cxx                      |    2 --
 vcl/quartz/AquaGraphicsBackend.cxx              |    2 --
 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx |    5 -----
 vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx |    2 --
 12 files changed, 4 insertions(+), 27 deletions(-)

New commits:
commit c5834bcfacba768fb361ae273534f1eac63f546f
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Tue Nov 19 17:55:08 2024 +0200
Commit:     Noel Grandin <noelgran...@gmail.com>
CommitDate: Wed Nov 20 07:08:06 2024 +0100

    use default implementation for hasFastDrawTransformedBitmap
    
    so only the one that implements it needs to override it
    
    Change-Id: I1acffb4796d95d75edc4507f533d9b1f8987972b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176790
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx
index 1550f3cd898f..0cb8ceefdedd 100644
--- a/vcl/headless/CairoCommon.cxx
+++ b/vcl/headless/CairoCommon.cxx
@@ -1988,8 +1988,6 @@ 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 58a50653a743..c1210be0e557 100644
--- a/vcl/headless/SvpGraphicsBackend.cxx
+++ b/vcl/headless/SvpGraphicsBackend.cxx
@@ -246,11 +246,6 @@ bool SvpGraphicsBackend::drawTransformedBitmap(const 
basegfx::B2DPoint& rNull,
                                                 getAntiAlias());
 }
 
-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 a62c2fad73dd..96630f39b681 100644
--- a/vcl/inc/headless/CairoCommon.hxx
+++ b/vcl/inc/headless/CairoCommon.hxx
@@ -229,7 +229,6 @@ 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/inc/headless/SvpGraphicsBackend.hxx 
b/vcl/inc/headless/SvpGraphicsBackend.hxx
index 53678d619198..a6f6f843482d 100644
--- a/vcl/inc/headless/SvpGraphicsBackend.hxx
+++ b/vcl/inc/headless/SvpGraphicsBackend.hxx
@@ -117,8 +117,6 @@ public:
                                const basegfx::B2DPoint& rY, const SalBitmap& 
rSourceBitmap,
                                const SalBitmap* pAlphaBitmap, double fAlpha) 
override;
 
-    bool hasFastDrawTransformedBitmap() const override;
-
     bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, 
tools::Long nHeight,
                        sal_uInt8 nTransparency) override;
 
diff --git a/vcl/inc/qt5/QtGraphics.hxx b/vcl/inc/qt5/QtGraphics.hxx
index fea1a2a0de18..eb1a870bb09f 100644
--- a/vcl/inc/qt5/QtGraphics.hxx
+++ b/vcl/inc/qt5/QtGraphics.hxx
@@ -146,8 +146,6 @@ public:
                                const basegfx::B2DPoint& rY, const SalBitmap& 
rSourceBitmap,
                                const SalBitmap* pAlphaBitmap, double fAlpha) 
override;
 
-    bool hasFastDrawTransformedBitmap() const override;
-
     bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, 
tools::Long nHeight,
                        sal_uInt8 nTransparency) override;
 
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h
index e0ccbfbb4fd1..40209e97b3ba 100644
--- a/vcl/inc/quartz/salgdi.h
+++ b/vcl/inc/quartz/salgdi.h
@@ -355,8 +355,6 @@ public:
                                const basegfx::B2DPoint& rY, const SalBitmap& 
rSourceBitmap,
                                const SalBitmap* pAlphaBitmap, double fAlpha) 
override;
 
-    bool hasFastDrawTransformedBitmap() const override;
-
     bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, 
tools::Long nHeight,
                        sal_uInt8 nTransparency) override;
 
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 5c4356e5bf62..6b2c35a35e36 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -571,7 +571,8 @@ protected:
     /// (for example, some OutputDevice optimizations could try access the 
pixels, which
     /// would make performance worse for GPU-backed backends).
     /// See also tdf#138068.
-    virtual bool hasFastDrawTransformedBitmap() const = 0;
+    /// Only currently true for SkiaSalGraphicsImpl
+    virtual bool hasFastDrawTransformedBitmap() const { return false; }
 
     /** Render solid rectangle with given transparency
      *
diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx
index 56e303b2806e..c79cf7ea14f3 100644
--- a/vcl/inc/salgdiimpl.hxx
+++ b/vcl/inc/salgdiimpl.hxx
@@ -206,7 +206,8 @@ public:
                 const SalBitmap* pAlphaBitmap,
                 double fAlpha) = 0;
 
-    virtual bool hasFastDrawTransformedBitmap() const = 0;
+    /// Only currently true for SkiaSalGraphicsImpl
+    virtual bool hasFastDrawTransformedBitmap() const { return false; }
 
     virtual bool drawAlphaRect(
                     tools::Long nX, tools::Long nY,
diff --git a/vcl/qt5/QtGraphics_GDI.cxx b/vcl/qt5/QtGraphics_GDI.cxx
index 15a0c64f14bc..fc039c685dc9 100644
--- a/vcl/qt5/QtGraphics_GDI.cxx
+++ b/vcl/qt5/QtGraphics_GDI.cxx
@@ -633,8 +633,6 @@ bool QtGraphicsBackend::drawTransformedBitmap(const 
basegfx::B2DPoint& rNull,
     return true;
 }
 
-bool QtGraphicsBackend::hasFastDrawTransformedBitmap() const { return false; }
-
 bool QtGraphicsBackend::drawAlphaRect(tools::Long nX, tools::Long nY, 
tools::Long nWidth,
                                       tools::Long nHeight, sal_uInt8 
nTransparency)
 {
diff --git a/vcl/quartz/AquaGraphicsBackend.cxx 
b/vcl/quartz/AquaGraphicsBackend.cxx
index 61a09efebc4f..958ea7fcc6f1 100644
--- a/vcl/quartz/AquaGraphicsBackend.cxx
+++ b/vcl/quartz/AquaGraphicsBackend.cxx
@@ -1287,8 +1287,6 @@ bool AquaGraphicsBackend::drawTransformedBitmap(const 
basegfx::B2DPoint& rNull,
     return true;
 }
 
-bool AquaGraphicsBackend::hasFastDrawTransformedBitmap() const { return false; 
}
-
 bool AquaGraphicsBackend::drawAlphaRect(tools::Long nX, tools::Long nY, 
tools::Long nWidth,
                                         tools::Long nHeight, sal_uInt8 
nTransparency)
 {
diff --git a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx 
b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx
index c4cda27cd006..acc9fc295523 100644
--- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx
+++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.cxx
@@ -128,11 +128,6 @@ void X11CairoSalGraphicsImpl::invert(sal_uInt32 nPoints, 
const Point* pPtAry, Sa
     mrCairoCommon.invert(nPoints, pPtAry, nFlags, getAntiAlias());
 }
 
-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 f6a9b2e83ab0..f0376e3b0068 100644
--- a/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
+++ b/vcl/unx/generic/gdi/X11CairoSalGraphicsImpl.hxx
@@ -164,8 +164,6 @@ public:
     bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, 
tools::Long nHeight,
                  void* pPtr, sal_uInt32 nSize) override;
 
-    bool hasFastDrawTransformedBitmap() const override;
-
     /** draw transformed bitmap (maybe with alpha) where Null, X, Y define the 
coordinate system */
     bool drawTransformedBitmap(const basegfx::B2DPoint& rNull, const 
basegfx::B2DPoint& rX,
                                const basegfx::B2DPoint& rY, const SalBitmap& 
rSourceBitmap,

Reply via email to