summaryrefslogtreecommitdiffstats
path: root/src/render/backend/platformsurfacefilter_p.h
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2017-02-02 16:57:02 +0200
committerAntti Määttä <antti.maatta@qt.io>2017-03-06 07:48:29 +0000
commit2b4bfd065ecfa28d8b7399ffed35a2f35834c461 (patch)
tree879b792dd9f75c25a42d59d5cd9ac99da5477639 /src/render/backend/platformsurfacefilter_p.h
parentfddaeae702df644c1792a29f1875201e8bd64e94 (diff)
Fix crash in scene2d when using angle
Angle can't do multithreaded rendering on shared context so it needs to synchronize the rendering with qt3d render thread. The SurfaceLocker uses static mutex, so using it to lock the surface will prevent simulatious rendering as well. Flag the surface lock for angle build only. Change-Id: I83d4e1f1d6a48e86196bc113cbab4ee79205b61f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/backend/platformsurfacefilter_p.h')
-rw-r--r--src/render/backend/platformsurfacefilter_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/backend/platformsurfacefilter_p.h b/src/render/backend/platformsurfacefilter_p.h
index ec10327fe..dbdc07b01 100644
--- a/src/render/backend/platformsurfacefilter_p.h
+++ b/src/render/backend/platformsurfacefilter_p.h
@@ -51,6 +51,8 @@
// We mean it.
//
+#include <private/qt3drender_global_p.h>
+
#include <QtCore/qobject.h>
#include <QtGui/qsurface.h>
#include <QSemaphore>
@@ -106,7 +108,7 @@ private:
void markSurfaceAsValid();
};
-class SurfaceLocker
+class QT3DRENDERSHARED_PRIVATE_EXPORT SurfaceLocker
{
public:
explicit SurfaceLocker(QSurface *surface);