summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper.cpp
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-02-23 15:05:38 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-02-23 16:22:18 (GMT)
commitd7181ae996f9add10bf4e956ddbedff99cb19378 (patch)
tree8a0a348b9a504856b153fbbff4a49a702fb82a90 /src/gui/painting/qdrawhelper.cpp
parent69abc957bca39bce4ed954b0469eb6abce8173fa (diff)
downloadQt-d7181ae996f9add10bf4e956ddbedff99cb19378.zip
Qt-d7181ae996f9add10bf4e956ddbedff99cb19378.tar.gz
Qt-d7181ae996f9add10bf4e956ddbedff99cb19378.tar.bz2
Cache the result of qDetectCPUFeatures()
Move the caching of the result from drawhelper to qsimd.cpp. Avoid getting the environment variables when not necessary Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/painting/qdrawhelper.cpp')
-rw-r--r--src/gui/painting/qdrawhelper.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index b9aa9ce..40fe499 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -7813,10 +7813,7 @@ static void qt_blend_color_argb_armv6(int count, const QSpan *spans, void *userD
void qInitDrawhelperAsm()
{
- static uint features = 0xffffffff;
- if (features != 0xffffffff)
- return;
- features = qDetectCPUFeatures();
+ const uint features = qDetectCPUFeatures();
qt_memfill32 = qt_memfill_template<quint32, quint32>;
qt_memfill16 = qt_memfill_quint16; //qt_memfill_template<quint16, quint16>;