-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix: Speed issues on Windows when immediate viewport is on another screen #5250
base: master
Are you sure you want to change the base?
Conversation
Preview available at https://egui-pr-preview.github.io/pr/5250-patch136 |
// Prune dead viewports: | ||
viewports.retain(|id, _| active_viewports_ids.contains(id)); | ||
viewport_from_window.retain(|_, id| active_viewports_ids.contains(id)); | ||
painter.gc_viewports(&active_viewports_ids); |
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 happened with this code?
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 happened with this code?
It is not necessary as it is handled in handle_viewport_output()
.
@@ -954,8 +949,6 @@ fn render_immediate_viewport( | |||
input | |||
}; | |||
|
|||
let egui_ctx = shared.borrow().egui_ctx.clone(); |
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 is this borrow()
that caused performance problems?
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.
Improvement : In glow and wgpu, we are removing egui_ctx and only using integration.egui_ctx.
Fix Issues: On Windows, we should use EventResult::RepaintNow() in Immediate Viewport to avoid FPS slowdown.
Fix Issues : Speed issues on Windows when immediate viewport is on another screen
On Windows, we should use
EventResult::RepaintNow()
inImmediate Viewport
to avoid FPS slowdown.Improvement : In
glow
andwgpu
, we are removingegui_ctx
and only usingintegration.egui_ctx
.This simplifies the structure and reduces the possibility of bugs.
immediate viewport
is on another screen #5249