File indexing completed on 2024-04-28 04:21:33

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_VLINE_ITERATOR_BENCHMARK_H
0008 #define KIS_VLINE_ITERATOR_BENCHMARK_H
0009 
0010 #include <simpletest.h>
0011 
0012 class KisPaintDevice;
0013 class KoColor;
0014 class KoColorSpace;
0015 
0016 
0017 class KisVLineIteratorBenchmark : public QObject
0018 {
0019     Q_OBJECT
0020 
0021 private:
0022     const KoColorSpace * m_colorSpace;
0023     KisPaintDevice * m_device;        
0024     KoColor * m_color;
0025 private Q_SLOTS:
0026     void initTestCase();
0027     void cleanupTestCase();
0028     
0029     void benchmarkCreation();
0030     
0031     // memcpy from KoColor to device
0032     void benchmarkWriteBytes();
0033     // memcpy from device to KoColor
0034     void benchmarkReadBytes();
0035     // const vline iterator used
0036     void benchmarkConstReadBytes();
0037     // copy from one device to another
0038     void benchmarkReadWriteBytes();
0039     
0040     void benchmarkNoMemCpy();
0041     void benchmarkConstNoMemCpy();
0042     void benchmarkTwoIteratorsNoMemCpy();
0043 };
0044 
0045 #endif