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

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_HLINEITERATOR_BENCHMARK_H
0008 #define KIS_HLINEITERATOR_BENCHMARK_H
0009 
0010 #include <simpletest.h>
0011 
0012 class KisPaintDevice;
0013 class KoColor;
0014 class KoColorSpace;
0015 
0016 
0017 class KisHLineIteratorBenchmark : 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     
0027     void initTestCase();
0028     void cleanupTestCase();
0029     
0030     void benchmarkCreation();
0031     
0032     // memcpy from KoColor to device
0033     void benchmarkWriteBytes();
0034     // memcpy from device to KoColor
0035     void benchmarkReadBytes();
0036     // const hline iterator used
0037     void benchmarkConstReadBytes();
0038     // copy from one device to another
0039     void benchmarkReadWriteBytes();
0040     
0041     void benchmarkReadWriteBytes2();
0042     
0043     void benchmarkNoMemCpy();
0044     void benchmarkConstNoMemCpy();
0045     // copy from one device to another
0046     void benchmarkTwoIteratorsNoMemCpy();
0047     
0048 
0049     
0050     
0051 };
0052 
0053 #endif