summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fbconvenience/qfbbackingstore.cpp
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.cpp
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.cpp')
-rw-r--r--src/platformsupport/fbconvenience/qfbbackingstore.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/platformsupport/fbconvenience/qfbbackingstore.cpp b/src/platformsupport/fbconvenience/qfbbackingstore.cpp
index 0fa23ebe02..733235ff42 100644
--- a/src/platformsupport/fbconvenience/qfbbackingstore.cpp
+++ b/src/platformsupport/fbconvenience/qfbbackingstore.cpp
@@ -69,5 +69,30 @@ void QFbBackingStore::resize(const QSize &size, const QRegion &staticContents)
mImage = QImage(size, window()->screen()->handle()->format());
}
+const QImage QFbBackingStore::image()
+{
+ return mImage;
+}
+
+void QFbBackingStore::lock()
+{
+ mImageMutex.lock();
+}
+
+void QFbBackingStore::unlock()
+{
+ mImageMutex.unlock();
+}
+
+void QFbBackingStore::beginPaint(const QRegion &)
+{
+ lock();
+}
+
+void QFbBackingStore::endPaint()
+{
+ unlock();
+}
+
QT_END_NAMESPACE