diff options
author | Mateusz Zalega <mateusz@appliedsourcery.com> | 2018-08-16 21:44:37 +0200 |
---|---|---|
committer | Mateusz Zalega <mateusz@appliedsourcery.com> | 2018-10-23 15:43:51 +0200 |
commit | d03291eeb1efbb1005eba5a8a4b2c92ef66d2fd5 (patch) | |
tree | 997b4a31291efaca2d1f60c54e95b81785a9ddcc /gui/fpgaviewwidget.h | |
parent | b5faa7ad102b8308eeb0c73a3849909bf4b1b635 (diff) | |
download | nextpnr-d03291eeb1efbb1005eba5a8a4b2c92ef66d2fd5.tar.gz nextpnr-d03291eeb1efbb1005eba5a8a4b2c92ef66d2fd5.tar.bz2 nextpnr-d03291eeb1efbb1005eba5a8a4b2c92ef66d2fd5.zip |
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>
Diffstat (limited to 'gui/fpgaviewwidget.h')
-rw-r--r-- | gui/fpgaviewwidget.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h index 4be41bf5..697ace21 100644 --- a/gui/fpgaviewwidget.h +++ b/gui/fpgaviewwidget.h @@ -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 |