Skip to content

Commit

Permalink
Update wgpu_integration.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored Jun 13, 2024
1 parent 5daa386 commit 0f6ee84
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions crates/eframe/src/native/wgpu_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ impl WgpuWinitRunning {
viewports,
painter,
viewport_from_window,
focused_viewport,
..
} = &mut *shared_mut;

let FullOutput {
Expand Down Expand Up @@ -724,7 +724,6 @@ impl WgpuWinitRunning {
viewports,
painter,
viewport_from_window,
*focused_viewport,
);

// Prune dead viewports:
Expand Down Expand Up @@ -996,7 +995,6 @@ fn render_immediate_viewport(
viewports,
painter,
viewport_from_window,
focused_viewport,
..
} = &mut *shared_mut;

Expand Down Expand Up @@ -1036,7 +1034,6 @@ fn render_immediate_viewport(
viewports,
painter,
viewport_from_window,
*focused_viewport,
);
}

Expand All @@ -1061,7 +1058,6 @@ fn handle_viewport_output(
viewports: &mut ViewportIdMap<Viewport>,
painter: &mut egui_wgpu::winit::Painter,
viewport_from_window: &mut HashMap<WindowId, ViewportId>,
focused_viewport: Option<ViewportId>,
) {
for (
viewport_id,
Expand All @@ -1083,15 +1079,13 @@ fn handle_viewport_output(
if let Some(window) = viewport.window.as_ref() {
let old_inner_size = window.inner_size();

let is_viewport_focused = focused_viewport == Some(viewport_id);
viewport.deferred_commands.append(&mut commands);

egui_winit::process_viewport_commands(
egui_ctx,
&mut viewport.info,
std::mem::take(&mut viewport.deferred_commands),
window,
is_viewport_focused,
&mut viewport.actions_requested,
);

Expand Down

0 comments on commit 0f6ee84

Please sign in to comment.