summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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