qt5base-lts/tests/benchmarks/gui/image/qimageconversion
Allan Sandfeld Jensen 5f59207bd3 Optimize drawing to and from generic formats
When drawing to and from the less common formats most of the cpu time
is spend in conversion. The conversion method is rather slow due to
using variable shifts and masks that the compiler does not have a chance
to optimize.

This patch changes the conversion methods to being templates fed by
constexpr methods. This allows the compiler to fully optimize the methods
yielding 2x->5x speedups.

The reliance on constexpr however means the optimized methods are only
used under C++11.

Change-Id: I2ec77c4c1c03f12ee463a694a2b59db0f0b52db1
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-31 00:24:48 +01:00
..
qimageconversion.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qimageconversion.cpp Optimize drawing to and from generic formats 2014-01-31 00:24:48 +01:00