Commit graph

113 commits

Author SHA1 Message Date
Ivailo Monev
57282fc808 drop ppm and pbm support
the size of ppm is larger than the raw QImage, what uses such formats
anyway?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-03 07:15:36 +03:00
Ivailo Monev
e297f68e33 remove redundant metatype registrations
among other things

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-03 02:51:02 +03:00
Ivailo Monev
ec5a2d8bb6 drop stylesheet support
just look at the warnings

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-16 04:36:33 +03:00
Ivailo Monev
783b4e90e9 drop unused QGraphicsItem custom data feature
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-15 03:15:49 +03:00
Ivailo Monev
cf1b19860d change the QPixmapCache key type to QByteArray from QString
QString is 2x the size of QByteArray (in terms of memory allocated)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-28 10:44:16 +02:00
Ivailo Monev
7a60a4a6ff fix benchmarks build
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-03-16 20:37:46 +02:00
Ivailo Monev
84dde53fd8 remove qml leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-10-21 09:40:45 +03:00
Ivailo Monev
bdd67963ec drop QVarLengthArray<T> and replace it with QStdVector<T> internally
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 20:59:14 +00:00
Ivailo Monev
04f3e6c541 replace use of QTime as timer with QElapsedTimer
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-07 09:16:34 +03:00
Ivailo Monev
2cb10fdb43 drop the QVarLengthArray<T> pre-allocation feature
note that it was optimistically increasing the size by 2x from
QVarLengthArray<T>::append() aswell

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-05-30 20:37:04 +03:00
Ivailo Monev
9164995c91 add QIcon benchmark
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-05-26 04:49:37 +03:00
Ivailo Monev
1396f53698 benchmark painting on and of mono image formats
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-11 01:05:18 +02:00
Ivailo Monev
f91411694a merge QRasterPixmapData into QPixmapData
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-09 23:06:30 +02:00
Ivailo Monev
5bebb9e7da remove broken benchmarks
require example sources

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-29 03:58:09 +03:00
Ivailo Monev
403921fab5 limit QImage dimensions to USHRT_MAX
65535x65535 is more than enough

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-10-21 19:25:02 +03:00
Ivailo Monev
b3fb63465e do not use resource files in benchmarks
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-06-13 23:50:43 +03:00
Ivailo Monev
351b6f320c large and transparent image samples for QImageReader benchmark
Katie image format is 6x faster than png on transparent images, note
the size of the images. benchmark result:
********* Start testing of tst_QImageReader *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageReader::initTestCase()
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.kat":
     0.450 msecs per iteration (total: 225, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.kat":
     5.148 msecs per iteration (total: 2,574, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.kat":
     2.176 msecs per iteration (total: 1,088, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.png":
     1.82 msecs per iteration (total: 911, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.png":
     19.46 msecs per iteration (total: 9,733, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.png":
     12.34 msecs per iteration (total: 6,171, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.ppm":
     0.586 msecs per iteration (total: 293, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.ppm":
     2.728 msecs per iteration (total: 1,364, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.ppm":
     2.418 msecs per iteration (total: 1,209, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.svg":
     10.79 msecs per iteration (total: 5,399, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.xpm":
     8.084 msecs per iteration (total: 4,042, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.xpm":
     75.654 msecs per iteration (total: 37,827, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.xpm":
     63.850 msecs per iteration (total: 31,925, iterations: 500)
PASS  : tst_QImageReader::readImage()
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.kat":
     1.94 msecs per iteration (total: 974, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.kat":
     6.598 msecs per iteration (total: 3,299, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.kat":
     3.594 msecs per iteration (total: 1,797, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.png":
     3.332 msecs per iteration (total: 1,666, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.png":
     20.360 msecs per iteration (total: 10,180, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.png":
     13.29 msecs per iteration (total: 6,645, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.ppm":
     1.44 msecs per iteration (total: 720, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.ppm":
     3.668 msecs per iteration (total: 1,834, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.ppm":
     3.364 msecs per iteration (total: 1,682, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.svg":
     9.324 msecs per iteration (total: 4,662, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.xpm":
     9.622 msecs per iteration (total: 4,811, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.xpm":
     77.180 msecs per iteration (total: 38,590, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.xpm":
     65.346 msecs per iteration (total: 32,673, iterations: 500)
PASS  : tst_QImageReader::setScaledSize()
PASS  : tst_QImageReader::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageReader *********

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-04 18:37:47 +02:00
Ivailo Monev
f81903f64d Katie image format optimization
from 2x faster to 3x compared to png, benchmark results bellow:
********* Start testing of tst_QImageReader *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageReader::initTestCase()
RESULT   : tst_QImageReader::readImage():"bench.kat":
     0.452 msecs per iteration (total: 226, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.pbm":
     0.026 msecs per iteration (total: 13, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.png":
     1.82 msecs per iteration (total: 912, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.ppm":
     0.588 msecs per iteration (total: 294, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.svg":
     10.80 msecs per iteration (total: 5,400, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.xpm":
     8.172 msecs per iteration (total: 4,086, iterations: 500)
PASS  : tst_QImageReader::readImage()
RESULT   : tst_QImageReader::setScaledSize():"bench.kat":
     1.95 msecs per iteration (total: 977, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.pbm":
     1.34 msecs per iteration (total: 671, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.png":
     3.328 msecs per iteration (total: 1,664, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.ppm":
     1.44 msecs per iteration (total: 720, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.svg":
     9.304 msecs per iteration (total: 4,652, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.xpm":
     9.730 msecs per iteration (total: 4,865, iterations: 500)
PASS  : tst_QImageReader::setScaledSize()
PASS  : tst_QImageReader::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageReader *********

********* Start testing of tst_QImageWriter *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageWriter::initTestCase()
RESULT   : tst_QImageWriter::writeImage():"kat":
     2.428 msecs per iteration (total: 1,214, iterations: 500)
RESULT   : tst_QImageWriter::writeImage():"png":
     7.798 msecs per iteration (total: 3,899, iterations: 500)
RESULT   : tst_QImageWriter::writeImage():"ppm":
     6.954 msecs per iteration (total: 3,477, iterations: 500)
PASS  : tst_QImageWriter::writeImage()
PASS  : tst_QImageWriter::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageWriter *********

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 01:11:30 +02:00
Ivailo Monev
58ad321c89 drop unused QQuaternion class [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 16:20:02 +02:00
Ivailo Monev
a36e690506 optional custom image format, for the details see the webp branch
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-27 22:33:16 +02:00
Ivailo Monev
f379fe8dbd remove irrelevant QImageIOHandler options
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-27 19:49:12 +02:00
Ivailo Monev
106c44d412 build fix for the case when QT_NO_STYLE_STYLESHEET is defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-26 21:56:12 +02:00
Ivailo Monev
64e61d523f build fix for the case when QT_NO_QUATERNION is defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-26 02:05:05 +02:00
Ivailo Monev
c357505009 QImageReader benchmark review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-25 18:07:16 +02:00
Ivailo Monev
01f76a3061 remove images created by QImageWriter benchmark
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-25 16:43:01 +02:00
Ivailo Monev
3b039cd479 new QImageWriter benchmark
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-25 16:41:07 +02:00
Ivailo Monev
a8143a1334 easier to maintain QImageReader benchmark
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-25 16:39:33 +02:00
Ivailo Monev
f4e311aa34 remove definitions for features that are no longer supported [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-24 15:10:49 +02:00
Ivailo Monev
408a45b0ad benchmark conversion of all image formats except invalid
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-02 04:33:19 +02:00
Ivailo Monev
d5b4617418 generate image in more generic way in tst_QImageConversion::generateImage()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-02 04:18:23 +02:00
Ivailo Monev
f74bdda700 adjust QPainter benchmark to indexed image format removal
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-02 04:07:17 +02:00
Ivailo Monev
05d9dd57c2 add PNG vs XPM QImageReader benchmark
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-01-31 01:55:33 +02:00
Ivailo Monev
d1784db6dd completely drop support for bitmap fonts [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-01-19 18:01:22 +02:00
Ivailo Monev
6b0acc6ef8 remove redundant QFontMetrics::width() argument and reimplement it via QFontMetrics::boundingRect()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-01-15 10:59:54 +02:00
Ivailo Monev
80bc0b2d97 replace references to various font families with GNU FreeFont alternatives
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-01-10 21:08:04 +02:00
Ivailo Monev
02bae76cda always allocate text engine layout data on the heap
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-01-04 14:26:02 +02:00
Ivailo Monev
047988bc27 remove static text leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-01-04 01:29:52 +02:00
Ivailo Monev
45e5fe0985 drop support for static text [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-01-03 23:39:29 +02:00
Ivailo Monev
ff3b339842 remove redundant QFont::StyleStrategy::ForceOutline enum [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-01-01 21:24:35 +02:00
Ivailo Monev
3424d3f5be get rid of QImage::Format_Indexed8
TODO: store mono colors as two QRgb instead of QVector<QRgb>

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-12-22 08:05:46 +02:00
Ivailo Monev
2a81a8a477 drop support for QConicalGradient [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-12-19 02:48:41 +02:00
Ivailo Monev
2f16098878 drop support for PGM
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-12-17 11:31:05 +02:00
Ivailo Monev
07b32b9be0 adjust QPainter benchmark
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-12-16 23:21:29 +02:00
Ivailo Monev
80ba445aed drop support for XBM format [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-12-16 07:05:19 +02:00
Ivailo Monev
252743f18d remove gif support leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-12-15 11:52:01 +02:00
Ivailo Monev
cda61d753f drop support for bmp, ico, tga, jpeg and tiff
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-12-14 23:28:49 +02:00
Ivailo Monev
7e8029a522 remove ODF format support leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-08-29 15:39:45 +03:00
Ivailo Monev
3077092466 remove obscure image formats leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-08-28 20:11:25 +03:00
Ivailo Monev
69cc1c0920 de-duplicate code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-08-25 19:15:02 +03:00
Ivailo Monev
b4d71cc15a get rid of Q_NULLPTR definition [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-08-06 15:35:28 +03:00