Performance fixes
Removes some repeated calls to Qt's font layouting by using QStaticText in FxLine and removing the overridden method ComboBox::sizeHint. Unifies Mixer::peakValueLeft and Mixer::peakValueRight into Mixer::getPeakValues so the array is only iterated once.
This commit is contained in:
@@ -51,8 +51,6 @@ public:
|
||||
return castModel<ComboBoxModel>();
|
||||
}
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
public slots:
|
||||
void selectNext();
|
||||
void selectPrevious();
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QStaticText>
|
||||
|
||||
#include "Knob.h"
|
||||
#include "LcdWidget.h"
|
||||
@@ -78,7 +79,7 @@ public:
|
||||
static const int FxLineHeight;
|
||||
|
||||
private:
|
||||
static void drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis, bool receiveFromThis );
|
||||
void drawFxLine( QPainter* p, const FxLine *fxLine, const QString& name, bool isActive, bool sendToThis, bool receiveFromThis );
|
||||
|
||||
FxMixerView * m_mv;
|
||||
LcdWidget* m_lcd;
|
||||
@@ -91,6 +92,8 @@ private:
|
||||
static QPixmap * s_sendBgArrow;
|
||||
static QPixmap * s_receiveBgArrow;
|
||||
|
||||
QStaticText m_staticTextName;
|
||||
|
||||
private slots:
|
||||
void renameChannel();
|
||||
void removeChannel();
|
||||
|
||||
@@ -314,8 +314,7 @@ public:
|
||||
m_playHandleRemovalMutex.unlock();
|
||||
}
|
||||
|
||||
static float peakValueLeft( sampleFrame * _ab, const f_cnt_t _frames );
|
||||
static float peakValueRight( sampleFrame * _ab, const f_cnt_t _frames );
|
||||
void getPeakValues( sampleFrame * _ab, const f_cnt_t _frames, float & peakLeft, float & peakRight ) const;
|
||||
|
||||
|
||||
bool criticalXRuns() const;
|
||||
|
||||
Reference in New Issue
Block a user