summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-10-30 22:00:11 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-10-30 22:00:11 (GMT)
commit98d8eeabea4b6c0da01380cec30fc6da5619be2e (patch)
treeca249fbefa4d172f4f35788d8a786590cd40e830 /src/gui
parent69df8210d4c2a144e7e2da43abb11e3ddb524265 (diff)
parent349b6c734aa7af85f3709312325c3b2e9abdad2b (diff)
downloadQt-98d8eeabea4b6c0da01380cec30fc6da5619be2e.zip
Qt-98d8eeabea4b6c0da01380cec30fc6da5619be2e.tar.gz
Qt-98d8eeabea4b6c0da01380cec30fc6da5619be2e.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 8f9d8ba..3717ed9 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include <QtCore/qglobal.h>
+#include <QtCore/qmutex.h>
#define QT_FT_BEGIN_HEADER
#define QT_FT_END_HEADER
@@ -4946,6 +4947,7 @@ public:
for (int i = 0; i < stops.size() && i <= 2; i++)
hash_val += stops[i].second.rgba();
+ QMutexLocker lock(&mutex);
QGradientColorTableHash::const_iterator it = cache.constFind(hash_val);
if (it == cache.constEnd())
@@ -4979,6 +4981,7 @@ protected:
}
QGradientColorTableHash cache;
+ QMutex mutex;
};
void QGradientCache::generateGradientColorTable(const QGradient& gradient, uint *colorTable, int size, int opacity) const