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:
@@ -180,7 +180,7 @@ int QmlProfilerRangeModel::bindingLoopDest(int index) const
|
||||
return m_data[index].bindingLoopHead;
|
||||
}
|
||||
|
||||
QColor QmlProfilerRangeModel::color(int index) const
|
||||
QRgb QmlProfilerRangeModel::color(int index) const
|
||||
{
|
||||
return colorBySelectionId(index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user