Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
perf(desktop-gpui): drop the export timer-resolution hold
Marcos Daniel Rivera Gonzalezb3a08c515693
diff --git a/apps/desktop-gpui/Cargo.toml b/apps/desktop-gpui/Cargo.tomlindex f0823efa0..1826ab22a 100644--- a/apps/desktop-gpui/Cargo.toml+++ b/apps/desktop-gpui/Cargo.toml@@ -179,7 +179,6 @@ raw-window-handle = "0.6"tray-icon = { version = "0.21.1", default-features = false }windows-sys = { version = "0.59", features = ["Win32_Foundation",- "Win32_Media","Win32_Security","Win32_System_Registry","Win32_System_SystemInformation",diff --git a/apps/desktop-gpui/src/editor_export.rs b/apps/desktop-gpui/src/editor_export.rsindex abbf6d98e..9d9ee19a7 100644--- a/apps/desktop-gpui/src/editor_export.rs+++ b/apps/desktop-gpui/src/editor_export.rs@@ -2863,26 +2863,6 @@ fn matches_compression(current: ExportCompression, expected: ExportCompression)std::mem::discriminant(¤t) == std::mem::discriminant(&expected)}-// The NV12 readback wait sleeps in 1 ms steps (`frame_pipeline.rs`), which the-// default 15.6 ms Windows timer resolution stretches to most of a frame each.-#[cfg(windows)]-struct TimerResolution;--#[cfg(windows)]-impl TimerResolution {- fn hold_one_millisecond() -> Self {- unsafe { windows_sys::Win32::Media::timeBeginPeriod(1) };- Self- }-}--#[cfg(windows)]-impl Drop for TimerResolution {- fn drop(&mut self) {- unsafe { windows_sys::Win32::Media::timeEndPeriod(1) };- }-}-#[allow(clippy::too_many_arguments)]async fn run_export(project_path: PathBuf,@@ -2903,9 +2883,6 @@ async fn run_export(if cancel.load(Ordering::Relaxed) {return Err("Export cancelled".into());}- #[cfg(windows)]- let _timer_resolution = TimerResolution::hold_one_millisecond();-let mut builder = ExporterBase::builder(project_path).with_force_ffmpeg_decoder(force);if cursor_only {builder = builder.with_config(make_cursor_only_project(project));