1
0
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:
Mateusz Zalega
2018-08-16 21:44:37 +02:00
parent b5faa7ad10
commit d03291eeb1
5 changed files with 184 additions and 90 deletions

View File

@@ -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