summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fbconvenience/qfbbackingstore_p.h
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@theqtcompany.com>2015-01-13 15:22:12 +0100
committerAndy Nichols <andy.nichols@theqtcompany.com>2015-01-19 15:55:00 +0100
commitd7068cbe1b37eb065c1902c8e944f3bc19db0ba4 (patch)
tree40937a5f28db5a57d083f898b1f96a07042e224a /src/platformsupport/fbconvenience/qfbbackingstore_p.h
parent668a3a4da177f2da668555224954d0df70646fa8 (diff)
Make threaded rendering possible with LinuxFB
It was previously not possible to render to a QBackingStore with the linuxfb platform plugin because of both the use of a QTimer created on the main thread and there was no lock on the backing store surface (which would lead to copy content to screen that being rendered in another thread). Change-Id: I0ea3600316ce29eb89f6595997847afe7086116f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/platformsupport/fbconvenience/qfbbackingstore_p.h')
-rw-r--r--src/platformsupport/fbconvenience/qfbbackingstore_p.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/platformsupport/fbconvenience/qfbbackingstore_p.h b/src/platformsupport/fbconvenience/qfbbackingstore_p.h
index 08a4b37eee..a9917e1450 100644
--- a/src/platformsupport/fbconvenience/qfbbackingstore_p.h
+++ b/src/platformsupport/fbconvenience/qfbbackingstore_p.h
@@ -46,6 +46,7 @@
//
#include <qpa/qplatformbackingstore.h>
+#include <QtCore/QMutex>
QT_BEGIN_NAMESPACE
@@ -64,12 +65,19 @@ public:
virtual void resize(const QSize &size, const QRegion &region);
- const QImage image() { return mImage; }
+ const QImage image();
+
+ void lock();
+ void unlock();
+
+ void beginPaint(const QRegion &);
+ void endPaint();
protected:
friend class QFbWindow;
QImage mImage;
+ QMutex mImageMutex;
};
QT_END_NAMESPACE