Skip to content

Commit

Permalink
fix: Proper full render when selecting nodes in devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Sep 13, 2024
1 parent 3444db6 commit bad6e99
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 0 additions & 2 deletions crates/core/src/render/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ impl Compositor {
});
}
}
dirty_nodes.clear();
dirty_area.take();
self.full_render = false;
return layers;
}
Expand Down
2 changes: 2 additions & 0 deletions crates/core/src/render/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ impl RenderPipeline<'_> {
SamplingOptions::default(),
None,
);

self.compositor_dirty_nodes.clear();
}

pub fn render(
Expand Down
7 changes: 7 additions & 0 deletions crates/renderer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,13 @@ impl Application {
self.measure_layout_on_next_render = true;
self.init_accessibility_on_next_render = true;
self.compositor.reset();
self.sdom
.get()
.compositor_dirty_area()
.unite_or_insert(&Area::new(
(0.0, 0.0).into(),
window.inner_size().to_torin(),
));
self.sdom.get().layout().reset();
self.platform_sender.send_modify(|state| {
state.information = PlatformInformation::from_winit(window);
Expand Down
1 change: 1 addition & 0 deletions crates/renderer/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ impl<'a, State: Clone> ApplicationHandler<EventMessage> for DesktopRenderer<'a,
}
EventMessage::RequestFullRerender => {
app.resize(window);
window.request_redraw();
}
EventMessage::InvalidateArea(area) => {
let fdom = app.sdom.get();
Expand Down

0 comments on commit bad6e99

Please sign in to comment.