diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-10-05 22:49:02 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-10-05 22:50:34 +0200 |
commit | 96cd6bc12cd606154ce69889b94043c0a658fdc3 (patch) | |
tree | ab797466f1a0ca07afd88450e89eb2d5c3ec27c0 /cv | |
parent | 48632ae113bc4a6e47756327699fa3f626b4afe9 (diff) |
api, cv, gui, pose-widget: remove window visibility check
Causes freezes on multiple displays.
Reported and tested in realtime by: @kzfr
Diffstat (limited to 'cv')
-rw-r--r-- | cv/video-widget.cpp | 8 | ||||
-rw-r--r-- | cv/video-widget.hpp | 4 |
2 files changed, 1 insertions, 11 deletions
diff --git a/cv/video-widget.cpp b/cv/video-widget.cpp index bc143378..0a26da39 100644 --- a/cv/video-widget.cpp +++ b/cv/video-widget.cpp @@ -47,14 +47,7 @@ void cv_video_widget::update_and_repaint() { QMutexLocker l(&mtx); - if (window_check_timer.elapsed_ms() > 250) - { - visible = is_window_visible(this); - window_check_timer.start(); - } - if (visible) - { if (_frame.empty() || !freshp) return; cv::cvtColor(_frame, _frame2, cv::COLOR_RGB2BGR); @@ -67,5 +60,4 @@ void cv_video_widget::update_and_repaint() texture = QImage((const unsigned char*) _frame3.data, _frame3.cols, _frame3.rows, QImage::Format_RGB888); freshp = false; update(); - } } diff --git a/cv/video-widget.hpp b/cv/video-widget.hpp index 46332afe..3e328977 100644 --- a/cv/video-widget.hpp +++ b/cv/video-widget.hpp @@ -8,7 +8,6 @@ #pragma once -#include "compat/timer.hpp" #include <opencv2/core/core.hpp> #include <memory> #include <QObject> @@ -33,7 +32,6 @@ private: QMutex mtx; QImage texture; QTimer timer; - Timer window_check_timer; cv::Mat _frame, _frame2, _frame3; - bool freshp, visible; + bool freshp; }; |