bin/find-can-be-private-symbols.functions.results |    1 
 canvas/inc/pch/precompiled_vclcanvas.hxx          |    1 
 canvas/source/vcl/canvashelper.cxx                |    1 
 include/vcl/bitmap/BitmapAlphaClampFilter.hxx     |   31 ---------------
 vcl/Library_vcl.mk                                |    1 
 vcl/qa/cppunit/BitmapFilterTest.cxx               |   18 ---------
 vcl/source/bitmap/BitmapAlphaClampFilter.cxx      |   43 ----------------------
 7 files changed, 96 deletions(-)

New commits:
commit 581c52dad2694df1e1d9d74fc687ae505747127d
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Sep 10 15:08:04 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed Sep 10 21:19:03 2025 +0200

    BitmapAlphaClampFilter is dead since
    
    since
        commit e7b460f9197a57360dd017481dc747170e6a729f
        Author: Noel Grandin <[email protected]>
        Date:   Sat Aug 30 15:23:11 2025 +0200
        BitmapEx->Bitmap in canvas
    
    Change-Id: Ie156403a9e7e8dc7cd1299b16a96db52b76e9607
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190763
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/bin/find-can-be-private-symbols.functions.results 
b/bin/find-can-be-private-symbols.functions.results
index fd2aebafc784..0646ae702adf 100644
--- a/bin/find-can-be-private-symbols.functions.results
+++ b/bin/find-can-be-private-symbols.functions.results
@@ -32,7 +32,6 @@ BasicManager::SetLibraryContainerInfo(LibraryContainerInfo 
const&)
 BasicManager::~BasicManager()
 BigInt::BigInt(unsigned int)
 BigInt::operator%=(BigInt const&)
-BitmapAlphaClampFilter::execute(BitmapEx const&) const
 BitmapBasicMorphologyFilter::filter(Bitmap const&) const
 BitmapColorQuantizationFilter::execute(BitmapEx const&) const
 BitmapConvolutionMatrixFilter::execute(BitmapEx const&) const
diff --git a/canvas/inc/pch/precompiled_vclcanvas.hxx 
b/canvas/inc/pch/precompiled_vclcanvas.hxx
index d8a0e367643f..dee8538d638d 100644
--- a/canvas/inc/pch/precompiled_vclcanvas.hxx
+++ b/canvas/inc/pch/precompiled_vclcanvas.hxx
@@ -35,7 +35,6 @@
 #include <vcl/BitmapReadAccess.hxx>
 #include <vcl/BitmapTools.hxx>
 #include <vcl/alpha.hxx>
-#include <vcl/bitmap/BitmapAlphaClampFilter.hxx>
 #include <vcl/canvastools.hxx>
 #include <vcl/dibtools.hxx>
 #include <vcl/gradient.hxx>
diff --git a/canvas/source/vcl/canvashelper.cxx 
b/canvas/source/vcl/canvashelper.cxx
index ac182c7ae73a..909f25b979fc 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -40,7 +40,6 @@
 #include <vcl/bitmap.hxx>
 #include <vcl/BitmapReadAccess.hxx>
 #include <vcl/canvastools.hxx>
-#include <vcl/bitmap/BitmapAlphaClampFilter.hxx>
 #include <vcl/skia/SkiaHelper.hxx>
 
 #include <canvas/canvastools.hxx>
diff --git a/include/vcl/bitmap/BitmapAlphaClampFilter.hxx 
b/include/vcl/bitmap/BitmapAlphaClampFilter.hxx
deleted file mode 100644
index 4a036263e0d9..000000000000
--- a/include/vcl/bitmap/BitmapAlphaClampFilter.hxx
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#pragma once
-
-#include <vcl/bitmap/BitmapFilter.hxx>
-
-/** If the alpha is beyond a certain threshold, make it fully transparent
- */
-class VCL_DLLPUBLIC BitmapAlphaClampFilter final : public BitmapFilter
-{
-public:
-    BitmapAlphaClampFilter(sal_uInt8 cThreshold)
-        : mcThreshold(cThreshold)
-    {
-    }
-
-    virtual Bitmap execute(Bitmap const& rBitmap) const override;
-
-private:
-    sal_uInt8 mcThreshold;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index c70e84699562..13cf799ffdb9 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -392,7 +392,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     vcl/source/bitmap/bitmappaint \
     vcl/source/bitmap/BitmapArithmeticBlendFilter \
     vcl/source/bitmap/BitmapShadowFilter \
-    vcl/source/bitmap/BitmapAlphaClampFilter \
     vcl/source/bitmap/BitmapBasicMorphologyFilter \
     vcl/source/bitmap/BitmapDarkenBlendFilter \
     vcl/source/bitmap/BitmapLightenBlendFilter \
diff --git a/vcl/qa/cppunit/BitmapFilterTest.cxx 
b/vcl/qa/cppunit/BitmapFilterTest.cxx
index 4c48d25fd69f..fb27ab59bd99 100644
--- a/vcl/qa/cppunit/BitmapFilterTest.cxx
+++ b/vcl/qa/cppunit/BitmapFilterTest.cxx
@@ -12,7 +12,6 @@
 #include <tools/stream.hxx>
 
 #include <vcl/BitmapWriteAccess.hxx>
-#include <vcl/bitmap/BitmapAlphaClampFilter.hxx>
 #include <vcl/bitmap/BitmapArithmeticBlendFilter.hxx>
 #include <vcl/bitmap/BitmapDarkenBlendFilter.hxx>
 #include <vcl/bitmap/BitmapLightenBlendFilter.hxx>
@@ -41,7 +40,6 @@ public:
     {
     }
 
-    void testClampAlpha();
     void testBlurCorrectness();
     void testBasicMorphology();
     void testPerformance();
@@ -54,7 +52,6 @@ public:
     void testArithmeticBlendFilter();
 
     CPPUNIT_TEST_SUITE(BitmapFilterTest);
-    CPPUNIT_TEST(testClampAlpha);
     CPPUNIT_TEST(testBlurCorrectness);
     CPPUNIT_TEST(testBasicMorphology);
     CPPUNIT_TEST(testPerformance);
@@ -92,21 +89,6 @@ private:
     }
 };
 
-void BitmapFilterTest::testClampAlpha()
-{
-    // Setup test bitmap
-    Size aSize(1, 1);
-    Bitmap aBitmap24Bit(aSize, vcl::PixelFormat::N24_BPP);
-
-    {
-        BitmapScopedWriteAccess aWriteAccess(aBitmap24Bit);
-        aWriteAccess->Erase(COL_RED);
-    }
-
-    BitmapFilter::Filter(aBitmap24Bit, BitmapAlphaClampFilter(0x7F));
-    CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>(0xFF), 
aBitmap24Bit.GetPixelColor(0, 0).GetAlpha());
-}
-
 void BitmapFilterTest::testBlurCorrectness()
 {
     // Setup test bitmap
diff --git a/vcl/source/bitmap/BitmapAlphaClampFilter.cxx 
b/vcl/source/bitmap/BitmapAlphaClampFilter.cxx
deleted file mode 100644
index 68061d4e37d6..000000000000
--- a/vcl/source/bitmap/BitmapAlphaClampFilter.cxx
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- */
-
-#include <vcl/bitmap/BitmapAlphaClampFilter.hxx>
-#include <vcl/BitmapWriteAccess.hxx>
-
-Bitmap BitmapAlphaClampFilter::execute(Bitmap const& rBitmap) const
-{
-    if (!rBitmap.HasAlpha())
-        return rBitmap;
-
-    Bitmap aNewBitmap(rBitmap);
-    {
-        BitmapScopedWriteAccess pWriteAcc(aNewBitmap);
-        const Size aSize(aNewBitmap.GetSizePixel());
-
-        for (sal_Int32 nY = 0; nY < sal_Int32(aSize.Height()); ++nY)
-        {
-            Scanline pScan = pWriteAcc->GetScanline(nY);
-
-            for (sal_Int32 nX = 0; nX < sal_Int32(aSize.Width()); ++nX)
-            {
-                BitmapColor aBitmapValue(pWriteAcc->GetPixelFromData(pScan, 
nX));
-                if ((255 - aBitmapValue.GetAlpha()) > mcThreshold)
-                {
-                    aBitmapValue.SetAlpha(0);
-                    pWriteAcc->SetPixelOnData(pScan, nX, aBitmapValue);
-                }
-            }
-        }
-    }
-
-    return aNewBitmap;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to