-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
waterfallplot: Use OpenGL #861
base: master
Are you sure you want to change the base?
waterfallplot: Use OpenGL #861
Conversation
a9f5b3c
to
eae677f
Compare
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
Signed-off-by: Patrick José Pereira <[email protected]>
eae677f
to
db8575a
Compare
@patrickelectric are you still encountering the aberrations on the left edge of the plot? |
@jaxxzer did you take a look in the video ? You can see it in the left corner. |
Yes I saw the problems that you mentioned in the past in the video, I thought it might have been fixed but an old video.
I'm hesitant to approve it in that case. I would prefer no graphical errors vs cpu usage (must have vs nice to have IMO). You know better than I what it will take to correct the problems after merge. I'll leave this to your judgement as maintainer. |
@jaxxzer this PR is a intermediate step to make both waterfallplot and polarplot full OpenGL and remove the QML elements (like the shadereffect). Moving waterfallplot to this final version will require a bigger code change for both waterfallplot and polarplot making this patch much worst to review. The final PR is already in progress based in this changes and the last version of polarplot. |
_painter->drawPixmap(_painter->viewport(), pix, QRect(0, 0, _image.width(), _image.height())); | ||
|
||
emit drawHorizontalRatioChanged(); | ||
emit drawVerticalRatioChanged(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about merging those two emits into one? if the horizontal and vertical changes at the same time probably there will be one less redraw
@@ -273,7 +259,10 @@ void WaterfallPlot::draw(const QVector<double>& points, float confidence, float | |||
_image.setPixelColor(_currentDrawIndex, i + virtualFloor, valueToRGB(points[factor * i])); | |||
} | |||
} | |||
_currentDrawIndex++; // This can get to be an issue at very fast update rates from ping | |||
|
|||
for (int i = virtualHeight; i < _image.height(); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how fast is this but perhaps this is something that could be improved by QConcurrent?
* | ||
* @return double | ||
*/ | ||
Q_INVOKABLE double drawHorizontalRatio() { return static_cast<double>(_currentDrawIndex + 1) / _image.width(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const.
* | ||
* @return double | ||
*/ | ||
Q_INVOKABLE double drawVerticalRatio() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const.
https://gfycat.com/ifr/RadiantQuarterlyAmericancrow