Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

perf(rendering): initialize screen and camera decoders concurrently

Richie McIlroy75df302336c0
diff --git a/crates/rendering/src/lib.rs b/crates/rendering/src/lib.rs
index 442ad18c8..386551a03 100644
--- a/crates/rendering/src/lib.rs
+++ b/crates/rendering/src/lib.rs
@@ -358,15 +358,10 @@ impl RecordingSegmentDecoders {
Ok(Some(camera))
};
- #[cfg(target_os = "windows")]
+ // Decoders spawn their own threads and just signal readiness, so screen
+ // and camera can always initialize concurrently.
let (screen, camera) = tokio::try_join!(screen_future, camera_future)?;
- #[cfg(not(target_os = "windows"))]
- let screen = screen_future.await?;
-
- #[cfg(not(target_os = "windows"))]
- let camera = camera_future.await?;
-
Ok(Self {
screen,
camera,