From bc6b594d9d67b33bafeb8768bb07cefa63dcb427 Mon Sep 17 00:00:00 2001 From: RJ Skerry-Ryan Date: Mon, 31 Dec 2018 13:16:18 -0800 Subject: [PATCH 1/2] Don't use QStylePainter in WSpinny. lp:1530720 Using a QStylePainter on *any* QOpenGLWidget seems to introduce up to a 10x rendering slowdown for *all* QOpenGLWidgets. We should probably figure out how to style WSpinny without QSS to realize this savings. --- src/widget/wspinny.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/widget/wspinny.cpp b/src/widget/wspinny.cpp index c59ad605971c..8610780feaa4 100644 --- a/src/widget/wspinny.cpp +++ b/src/widget/wspinny.cpp @@ -318,13 +318,10 @@ void WSpinny::render() { &m_dGhostAngleCurrentPlaypos); } - QStyleOption option; - option.initFrom(this); - QStylePainter p(this); + QPainter p(this); p.setRenderHint(QPainter::Antialiasing); p.setRenderHint(QPainter::HighQualityAntialiasing); p.setRenderHint(QPainter::SmoothPixmapTransform); - p.drawPrimitive(QStyle::PE_Widget, option); if (m_pBgImage) { p.drawImage(rect(), *m_pBgImage, m_pBgImage->rect()); From 16478eba3da4006c26691504c7e22f43ad91e7bc Mon Sep 17 00:00:00 2001 From: RJ Skerry-Ryan Date: Sun, 20 Jan 2019 17:13:01 -0800 Subject: [PATCH 2/2] Remove styling of WSpinny widgets. This should be a no-op. --- res/skins/LateNight/style.qss | 7 ------- res/skins/Tango/style.qss | 6 +----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/res/skins/LateNight/style.qss b/res/skins/LateNight/style.qss index 44f69b38b55e..b0c98a31eb77 100644 --- a/res/skins/LateNight/style.qss +++ b/res/skins/LateNight/style.qss @@ -149,13 +149,6 @@ WTime { border-right: 1px solid #585858; } -WSpinny {/* - This produces artifacts in spinny bg - background-color: rgba(1, 1, 1, 10); - This makes no difference, the spinny loads some default grey bg - background: none;*/ -} - #VisualizationContainer { border: 1px solid #585858; border-top: 0px; diff --git a/res/skins/Tango/style.qss b/res/skins/Tango/style.qss index e71b2209c7b0..7cc24266663c 100644 --- a/res/skins/Tango/style.qss +++ b/res/skins/Tango/style.qss @@ -1907,10 +1907,6 @@ WTrackProperty#SamplerTitle_mini { margin-right: 3px; } -#SpinnyMini { - background-color: transparent; -} - /*################################################################ ###### Preview Deck ########################################## ##############################################################*/ @@ -2338,7 +2334,7 @@ WLibrary QPushButton { QPushButton#btnUnhide { font-weight: bold; } - + /* 'Enable AutoDJ' button */ QPushButton#pushButtonAutoDJ:hover, QPushButton#pushButtonRecording:hover,