forked from 1b-agent/opencadstudio-upstream
Fix layout cache correctness and GPU resource recovery
This commit is contained in:
1 parent
1a4b389b0e
commit
ac8a545669
11 files changed
+352
-326
No files matched your search
@@ -3046,8 +3046,7 @@ impl OpenCADStudio {
|
||||
}
|
||||
|
||||
Message::LayoutSettled => {
|
||||
// The notice frame has been presented, so the compositor has
|
||||
// had its answer. Let the next frame build the real thing.
|
||||
// Restore the scene after the notice redraw.
|
||||
self.layout_settling = false;
|
||||
Task::none()
|
||||
}
|
||||
|
||||
@@ -5535,9 +5535,7 @@ impl OpenCADStudio {
|
||||
.layers
|
||||
.sync_with_viewports(&doc_layers, vp_info);
|
||||
let layers_ms = perf_phase.elapsed().as_secs_f64() * 1000.0;
|
||||
// The switch is cheap; the frame that follows it is not. Draw a notice
|
||||
// for one frame first, so the compositor gets an answer before the main
|
||||
// thread disappears into rebuilding the wire set.
|
||||
// Give the layout rebuild a visible notice first.
|
||||
self.layout_settling = true;
|
||||
if perf {
|
||||
crate::perf_record!(
|
||||
|
||||
Reference in new issue
Block a user