mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-05-01 14:05:55 +00:00
gui: improved FPGAViewWidget::paintGL() performance
Profiling revealed that memcpy() in QOpenGLBuffer::allocate() had been taking the most time during paintGL() calls. I've been able to take the CPU usage down to about 1/4 of its previous values by caching elements in VBOs and updating them only after subsequent calls to renderGraphicElement(). Signed-off-by: Mateusz Zalega <mateusz@appliedsourcery.com>
This commit is contained in:
@@ -304,6 +304,7 @@ class FPGAViewWidget : public QOpenGLWidget, protected QOpenGLFunctions
|
||||
QVector4D mouseToWorldCoordinates(int x, int y);
|
||||
QVector4D mouseToWorldDimensions(float x, float y);
|
||||
QMatrix4x4 getProjection(void);
|
||||
void update_vbos();
|
||||
};
|
||||
|
||||
NEXTPNR_NAMESPACE_END
|
||||
|
||||
Reference in New Issue
Block a user