summaryrefslogtreecommitdiffstats
path: root/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2017-09-21 14:36:54 +0200
committerOliver Wolff <oliver.wolff@qt.io>2017-09-25 10:36:07 +0000
commit020e7b4c198f5e74dd83da7fa8e64a02b14af2f9 (patch)
tree9b4b7bf67e8201d75fcab9c4d6014ea78363e7e9 /src/plugins/winrt/qwinrtabstractvideorenderercontrol.h
parentf6838120ead0361463c800c25a711b799fae29ee (diff)
winrt: Use QMutex instead of criticalSections
critical sections are really unpredictable when it comes to order of activation. It was possible that the loop in QWinRTAbstractVideoRendererControl's syncAndRender blocked its setBlitMode for up to 30 seconds on application start. During this time the camera screen just stayed black. The whole approach seems to work a lot better when QMutexes are used. Task-number: QTBUG-63015 Change-Id: Ib1b0fa1da35fe299896068146254e4cf1d9616fb Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/winrt/qwinrtabstractvideorenderercontrol.h')
-rw-r--r--src/plugins/winrt/qwinrtabstractvideorenderercontrol.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h
index a7ba2998a..53dcb6b94 100644
--- a/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h
+++ b/src/plugins/winrt/qwinrtabstractvideorenderercontrol.h
@@ -96,22 +96,6 @@ private:
Q_DECLARE_PRIVATE(QWinRTAbstractVideoRendererControl)
};
-class CriticalSectionLocker
-{
-public:
- CriticalSectionLocker(CRITICAL_SECTION *section)
- : m_section(section)
- {
- EnterCriticalSection(m_section);
- }
- ~CriticalSectionLocker()
- {
- LeaveCriticalSection(m_section);
- }
-private:
- CRITICAL_SECTION *m_section;
-};
-
QT_END_NAMESPACE
#endif // QWINRTABSTRACTVIDEORENDERERCONTROL_H