From 7410c4a2d79b75afca806f286e9cf467f90f45cc Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 10 May 2021 23:19:32 -0700 Subject: [PATCH] onroad UI optimizations (#20871) * onroad UI optimizations * remove that Co-authored-by: Comma Device old-commit-hash: 5f5bbd64f28c2567cddccd5e27a93599d57b010b --- selfdrive/ui/qt/onroad.cc | 6 ++++++ selfdrive/ui/qt/onroad.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 755d6d3d9c..4310ea6fc7 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -25,6 +25,7 @@ OnroadWindow::OnroadWindow(QWidget *parent) : QWidget(parent) { alerts->raise(); setLayout(layout); + setAttribute(Qt::WA_OpaquePaintEvent); } // ***** onroad widgets ***** @@ -166,6 +167,11 @@ void OnroadAlerts::paintEvent(QPaintEvent *event) { } } + +NvgWindow::NvgWindow(QWidget *parent) : QOpenGLWidget(parent) { + setAttribute(Qt::WA_OpaquePaintEvent); +} + NvgWindow::~NvgWindow() { makeCurrent(); doneCurrent(); diff --git a/selfdrive/ui/qt/onroad.h b/selfdrive/ui/qt/onroad.h index a3aab63d34..9e93164e5a 100644 --- a/selfdrive/ui/qt/onroad.h +++ b/selfdrive/ui/qt/onroad.h @@ -60,7 +60,7 @@ class NvgWindow : public QOpenGLWidget, protected QOpenGLFunctions { public: using QOpenGLWidget::QOpenGLWidget; - explicit NvgWindow(QWidget* parent = 0) : QOpenGLWidget(parent) {}; + explicit NvgWindow(QWidget* parent = 0); ~NvgWindow(); protected: