[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/krita/plugins/paintops/sumie
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2008-06-27 13:41:30
Message-ID: 1214574090.759370.18454.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 825114 by rempt:

Lock (not the right solution, but apparently the same
paintop instance is called from multiple threads and
that ruins our state)


 M  +2 -0      kis_sumipaintop.cpp  
 M  +2 -0      kis_sumipaintop.h  


--- trunk/koffice/krita/plugins/paintops/sumie/kis_sumipaintop.cpp #825113:825114
@@ -21,6 +21,7 @@
 
 #include <QRect>
 #include <QColor>
+#include <QMutexLocker>
 
 #include <KoColor.h>
 #include <KoColorSpace.h>
@@ -65,6 +66,7 @@
 
 void KisSumiPaintOp::paintAt(const KisPaintInformation& info)
 {
+    QMutexLocker locker(&m_mutex);
     if (!painter()) return;
     // read, write pixel data
     KisPaintDeviceSP device = painter()->device();
--- trunk/koffice/krita/plugins/paintops/sumie/kis_sumipaintop.h #825113:825114
@@ -24,6 +24,7 @@
 #define KIS_SUMIPAINTOP_H_
 
 #include <QColor>
+#include <QMutex>
 
 #include <klocale.h>
 #include <kis_paintop.h>
@@ -68,6 +69,7 @@
 	bool newStrokeFlag;
 	Stroke stroke;
 	KisPaintDeviceSP dab;
+    QMutex m_mutex;
 };
 
 #endif // KIS_SUMIPAINTOP_H_
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic