Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
perf(rendering): size the camera converter only when a fallback conversion needs it
Richie McIlroy555b566c41e0
diff --git a/crates/rendering/src/layers/camera.rs b/crates/rendering/src/layers/camera.rsindex 046fb342b..f2d3c7a24 100644--- a/crates/rendering/src/layers/camera.rs+++ b/crates/rendering/src/layers/camera.rs@@ -472,15 +472,6 @@ impl CameraLayer {);}PixelFormat::Nv12 => {- if let Err(e) = self.yuv_converter.prepare_for_dimensions(- device,- frame_size.x,- frame_size.y,- ) {- tracing::warn!(error = %e, "YUV converter prepare failed");- return;- }-#[cfg(target_os = "macos")]let converted_into_frame = {frame_source = camera_frame@@ -501,6 +492,15 @@ impl CameraLayer {let converted_into_frame = false;if !converted_into_frame {+ if let Err(e) = self.yuv_converter.prepare_for_dimensions(+ device,+ frame_size.x,+ frame_size.y,+ ) {+ tracing::warn!(error = %e, "YUV converter prepare failed");+ return;+ }+// Submitted on its own ahead of `encoder`, so queue order// still has the conversion land before the copy below.#[cfg(target_os = "linux")]