-
Notifications
You must be signed in to change notification settings - Fork 366
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
Remove log spam when quickly resizing the viewer #5189
Conversation
We know egui already sets the viewport correctly, so let's not do it redundantly!
@@ -78,7 +78,7 @@ impl egui_wgpu::CallbackTrait for ReRendererCallback { | |||
|
|||
fn paint<'a>( | |||
&'a self, | |||
info: egui::PaintCallbackInfo, | |||
_info: egui::PaintCallbackInfo, |
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.
So the viewport coming from egui was somehow wrong?
Is this a bug in an egui crate?
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.
we only passed on the viewport offset from egui, not the viewport size. We then assumed the size was what we had previously on the viewbuilder and set a new viewport accordingly. In rare cases it turned out that this size + the offset from egui caused us to set an invalid viewport (after egui already set a correct one).
... which come to think means that the viewbuilder got an outdated size! This is concerning but I reckon this can easily happen though when new sizes come in asynchronously; to nail this down perfectly we'd need to know when egui queries the size that leads to the final renderpass.
This PR instead just trusts egui with the viewport setting, after all egui also set up the renderpass and knows what a valid viewport is for that renderpass.
### What * Fixes #4455 Got a good repro of this on my windows machine by using the screenshot action on a low-dpi screen (screenshot action will do a quick resize on native) while having the pose tracking example open. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/5189/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/5189/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/5189/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/5189) - [Docs preview](https://rerun.io/preview/f54be52f2819874bcec35e91db189eb369a007af/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/f54be52f2819874bcec35e91db189eb369a007af/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
What
Got a good repro of this on my windows machine by using the screenshot action on a low-dpi screen (screenshot action will do a quick resize on native) while having the pose tracking example open.
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io