File indexing completed on 2025-02-16 04:05:06
0001 /* 0002 * SPDX-FileCopyrightText: 2010 Lukáš Tvrdý <lukast.dev@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KIS_FLOODFILL_BENCHMARK_H 0008 #define KIS_FLOODFILL_BENCHMARK_H 0009 0010 #include <KoColor.h> 0011 0012 #include <kis_types.h> 0013 #include <simpletest.h> 0014 #include <kis_paint_device.h> 0015 0016 class KoColor; 0017 0018 class KisFloodFillBenchmark : public QObject 0019 { 0020 Q_OBJECT 0021 private: 0022 const KoColorSpace * m_colorSpace; 0023 KoColor m_color; 0024 KisPaintDeviceSP m_deviceStandardFloodFill; 0025 KisPaintDeviceSP m_deviceWithSelectionAsBoundary; 0026 KisPaintDeviceSP m_deviceWithoutSelectionAsBoundary; 0027 KisPaintDeviceSP m_existingSelection; 0028 int m_startX; 0029 int m_startY; 0030 0031 private Q_SLOTS: 0032 void initTestCase(); 0033 void cleanupTestCase(); 0034 0035 void benchmarkFlood(); 0036 void benchmarkFloodWithoutSelectionAsBoundary(); 0037 void benchmarkFloodWithSelectionAsBoundary(); 0038 0039 0040 0041 0042 }; 0043 0044 #endif