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

0001 /*
0002  *  SPDX-FileCopyrightText: 2012 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __KIS_COMPOSITION_BENCHMARK_H
0008 #define __KIS_COMPOSITION_BENCHMARK_H
0009 
0010 #include <simpletest.h>
0011 
0012 class KisCompositionBenchmark : public QObject
0013 {
0014     Q_OBJECT
0015 private Q_SLOTS:
0016     void detectBuildArchitecture();
0017 
0018     void checkRoundingAlphaDarken_05_03();
0019     void checkRoundingAlphaDarken_05_05();
0020     void checkRoundingAlphaDarken_05_07();
0021     void checkRoundingAlphaDarken_05_10();
0022     void checkRoundingAlphaDarken_05_10_08();
0023     void checkRoundingAlphaDarkenF32_05_03();
0024     void checkRoundingAlphaDarkenF32_05_05();
0025     void checkRoundingAlphaDarkenF32_05_07();
0026     void checkRoundingAlphaDarkenF32_05_10();
0027     void checkRoundingAlphaDarkenF32_05_10_08();
0028 
0029     void checkRoundingOver();
0030     void checkRoundingOverRgbaU16();
0031     void checkRoundingOverRgbaF32();
0032 
0033     void checkRoundingCopyRgbaU16();
0034     void checkRoundingCopyRgbaF32();
0035 
0036     void compareAlphaDarkenOps();
0037     void compareAlphaDarkenOpsNoMask();
0038     void compareRgbU16AlphaDarkenOps();
0039     void compareRgbF32AlphaDarkenOps();
0040 
0041     void compareOverOps();
0042     void compareOverOpsNoMask();
0043     void compareRgbU16OverOps();
0044     void compareRgbF32OverOps();
0045 
0046     void compareRgbU8CopyOps();
0047     void compareRgbU16CopyOps();
0048     void compareRgbF32CopyOps();
0049 
0050     void testRgb8CompositeAlphaDarkenLegacy();
0051     void testRgb8CompositeAlphaDarkenOptimized();
0052 
0053     void testRgb8CompositeOverLegacy();
0054     void testRgb8CompositeOverOptimized();
0055 
0056     void testRgb16CompositeAlphaDarkenLegacy();
0057     void testRgb16CompositeAlphaDarkenOptimized();
0058 
0059     void testRgb16CompositeOverLegacy();
0060     void testRgb16CompositeOverOptimized();
0061 
0062     void testRgb16CompositeCopyLegacy();
0063     void testRgb16CompositeCopyOptimized();
0064 
0065     void testRgbF32CompositeAlphaDarkenLegacy();
0066     void testRgbF32CompositeAlphaDarkenOptimized();
0067 
0068     void testRgbF32CompositeOverLegacy();
0069     void testRgbF32CompositeOverOptimized();
0070 
0071     void testRgbF32CompositeCopyLegacy();
0072     void testRgbF32CompositeCopyOptimized();
0073 
0074     void testRgb8CompositeAlphaDarkenReal_Aligned();
0075     void testRgb8CompositeOverReal_Aligned();
0076 
0077     void testRgb8CompositeCopyLegacy();
0078     void testRgb8CompositeCopyOptimized();
0079 
0080     void benchmarkMemcpy();
0081 
0082     void benchmarkUintFloat();
0083     void benchmarkUintIntFloat();
0084     void benchmarkFloatUint();
0085     void benchmarkFloatIntUint();
0086 };
0087 
0088 #endif /* __KIS_COMPOSITION_BENCHMARK_H */