forked from qt-creator/qt-creator
Timeline: Use QRgb and a lookup table for colors
It makes no sense to return a QColor as the only things we are using are the red, green, and blue components. Furthermore, colorFromHue() can only generate 360 different colors which we can easily cache instead of recalculating them on each request. This significantly reduces the time it takes to update the timeline render nodes. Change-Id: I7961014364a1bec5b089285148b2e6c141a6dc7d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -38,7 +38,7 @@ public:
|
||||
DebugMessagesModel(QmlProfilerModelManager *manager, QObject *parent = 0);
|
||||
|
||||
int typeId(int index) const override;
|
||||
QColor color(int index) const override;
|
||||
QRgb color(int index) const override;
|
||||
QVariantList labels() const override;
|
||||
QVariantMap details(int index) const override;
|
||||
int expandedRow(int index) const override;
|
||||
|
||||
Reference in New Issue
Block a user