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

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Eugene Ingerman geneing at gmail dot com
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KIS_THUMBNAIL_BENCHMARK_H
0008 #define KIS_THUMBNAIL_BENCHMARK_H
0009 
0010 #include <simpletest.h>
0011 #include "kis_paint_device.h"
0012 
0013 class KoColor;
0014 class KoColorSpace;
0015 
0016 class KisThumbnailBenchmark : public QObject
0017 {
0018     Q_OBJECT
0019 
0020 private:
0021     const KoColorSpace * m_colorSpace;
0022     KisPaintDeviceSP m_dev;
0023     QVector<QImage> m_thumbnails;
0024     QSize m_thumbnailSizeLimit;
0025     int m_oversampleRatio;
0026     int m_skipCount;
0027 
0028 private Q_SLOTS:
0029     void initTestCase();
0030     void cleanupTestCase();
0031 
0032     void benchmarkCreateThumbnail();
0033     void benchmarkCreateThumbnailCached();
0034     void benchmarkCreateThumbnailHiQ();
0035 
0036     void benchmarkCreateThumbnailHiQcreateThumbOversample2x();
0037     void benchmarkCreateThumbnailHiQcreateThumbOversample3x();
0038     void benchmarkCreateThumbnailHiQcreateThumbOversample4x();
0039 
0040 };
0041 
0042 
0043 #endif