Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Remove composite pipeline prewarm and update types
Richie McIlroyce7d9d4134fd
diff --git a/apps/desktop/src-tauri/src/gpu_context.rs b/apps/desktop/src-tauri/src/gpu_context.rsindex 726cc4846..4fb5fe6da 100644--- a/apps/desktop/src-tauri/src/gpu_context.rs+++ b/apps/desktop/src-tauri/src/gpu_context.rs@@ -158,15 +158,6 @@ pub async fn get_shared_gpu() -> Option<&'static SharedGpuContext> {pub fn prewarm_gpu() {tokio::spawn(async {- let gpu = get_shared_gpu().await;- if let Some(gpu) = gpu {- let device = gpu.device.clone();- std::thread::Builder::new()- .name("pipeline-prewarm".into())- .spawn(move || {- cap_rendering::prewarm_composite_pipeline(&device);- })- .ok();- }+ get_shared_gpu().await;});}diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.tsindex d32d6b271..0fb6d0b50 100644--- a/apps/desktop/src/utils/tauri.ts+++ b/apps/desktop/src/utils/tauri.ts@@ -403,7 +403,6 @@ videoImportProgress: "video-import-progress"/** user-defined types **/-export type AllGpusInfo = { gpus: GpuInfoDiag[]; primaryGpuIndex: number | null; isMultiGpuSystem: boolean; hasDiscreteGpu: boolean }export type Annotation = { id: string; type: AnnotationType; x: number; y: number; width: number; height: number; strokeColor: string; strokeWidth: number; fillColor: string; opacity: number; rotation: number; text: string | null; maskType?: MaskType | null; maskLevel?: number | null }export type AnnotationType = "arrow" | "circle" | "rectangle" | "text" | "mask"export type AppTheme = "system" | "light" | "dark"@@ -477,7 +476,6 @@ quality: number | null;*/fast: boolean | null }export type GlideDirection = "none" | "left" | "right" | "up" | "down"-export type GpuInfoDiag = { vendor: string; description: string; dedicatedVideoMemoryMb: number; adapterIndex: number; isSoftwareAdapter: boolean; isBasicRenderDriver: boolean; supportsHardwareEncoding: boolean }export type HapticPattern = "alignment" | "levelChange" | "generic"export type HapticPerformanceTime = "default" | "now" | "drawCompleted"export type Hotkey = { code: string; meta: boolean; ctrl: boolean; alt: boolean; shift: boolean }@@ -491,6 +489,7 @@ export type JsonValue<T> = [T]export type LogicalBounds = { position: LogicalPosition; size: LogicalSize }export type LogicalPosition = { x: number; y: number }export type LogicalSize = { width: number; height: number }+export type MacOSVersionInfo = { major: number; minor: number; patch: number; displayName: string; buildNumber: string; isAppleSilicon: boolean }export type MainWindowRecordingStartBehaviour = "close" | "minimise"export type MaskKeyframes = { position?: MaskVectorKeyframe[]; size?: MaskVectorKeyframe[]; intensity?: MaskScalarKeyframe[] }export type MaskKind = "sensitive" | "highlight"@@ -534,7 +533,6 @@ export type RecordingStatus = "pending" | "recording"export type RecordingStopped = nullexport type RecordingTargetMode = "display" | "window" | "area" | "camera"export type RenderFrameEvent = { frame_number: number; fps: number; resolution_base: XY<number> }-export type RenderingStatus = { isUsingSoftwareRendering: boolean; isUsingBasicRenderDriver: boolean; hardwareEncodingAvailable: boolean; warningMessage: string | null }export type RequestOpenRecordingPicker = { target_mode: RecordingTargetMode | null }export type RequestOpenSettings = { page: string }export type RequestScreenCapturePrewarm = { force?: boolean }@@ -557,7 +555,7 @@ export type StartRecordingInputs = { capture_target: ScreenCaptureTarget; capturexport type StereoMode = "stereo" | "monoL" | "monoR"export type StudioRecordingMeta = { segment: SingleSegment } | { inner: MultipleSegments }export type StudioRecordingStatus = { status: "InProgress" } | { status: "NeedsRemux" } | { status: "Failed"; error: string } | { status: "Complete" }-export type SystemDiagnostics = { windowsVersion: WindowsVersionInfo | null; gpuInfo: GpuInfoDiag | null; allGpus: AllGpusInfo | null; renderingStatus: RenderingStatus; availableEncoders: string[]; graphicsCaptureSupported: boolean; d3D11VideoProcessorAvailable: boolean }+export type SystemDiagnostics = { macosVersion: MacOSVersionInfo | null; availableEncoders: string[]; screenCaptureSupported: boolean; metalSupported: boolean; gpuName: string | null }export type TargetUnderCursor = { display_id: DisplayId | null; window: WindowUnderCursor | null }export type TextSegment = { start: number; end: number; enabled?: boolean; content?: string; center?: XY<number>; size?: XY<number>; fontFamily?: string; fontSize?: number; fontWeight?: number; italic?: boolean; color?: string; fadeDuration?: number }export type TimelineConfiguration = { segments: TimelineSegment[]; zoomSegments: ZoomSegment[]; sceneSegments?: SceneSegment[]; maskSegments?: MaskSegment[]; textSegments?: TextSegment[] }@@ -576,7 +574,6 @@ export type WindowExclusion = { bundleIdentifier?: string | null; ownerName?: stexport type WindowId = stringexport type WindowPosition = { x: number; y: number; displayId?: DisplayId | null }export type WindowUnderCursor = { id: WindowId; app_name: string; bounds: LogicalBounds }-export type WindowsVersionInfo = { major: number; minor: number; build: number; displayName: string; meetsRequirements: boolean; isWindows11: boolean }export type XY<T> = { x: T; y: T }export type ZoomMode = "auto" | { manual: { x: number; y: number } }export type ZoomSegment = { start: number; end: number; amount: number; mode: ZoomMode; glideDirection?: GlideDirection; glideSpeed?: number; instantAnimation?: boolean; edgeSnapRatio?: number }diff --git a/crates/rendering/src/lib.rs b/crates/rendering/src/lib.rsindex a1b232fcf..b31fbf852 100644--- a/crates/rendering/src/lib.rs+++ b/crates/rendering/src/lib.rs@@ -20,20 +20,6 @@ use std::{collections::HashMap, sync::Arc};use std::{path::PathBuf, time::Instant};use tokio::sync::mpsc;-static PRECOMPILED_COMPOSITE_PIPELINE: std::sync::OnceLock<- Arc<composite_frame::CompositeVideoFramePipeline>,-> = std::sync::OnceLock::new();--pub fn prewarm_composite_pipeline(device: &wgpu::Device) {- let pipeline = composite_frame::CompositeVideoFramePipeline::new(device);- let _ = PRECOMPILED_COMPOSITE_PIPELINE.set(Arc::new(pipeline));-}--pub fn get_precompiled_composite_pipeline()--> Option<Arc<composite_frame::CompositeVideoFramePipeline>> {- PRECOMPILED_COMPOSITE_PIPELINE.get().cloned()-}-pub mod composite_frame;mod coord;pub mod cpu_yuv;@@ -2521,11 +2507,7 @@ impl RendererLayers {) -> Self {let shared_yuv_pipelines = Arc::new(yuv_converter::YuvConverterPipelines::new(device));let shared_composite_pipeline =- if let Some(precompiled) = get_precompiled_composite_pipeline() {- precompiled- } else {- Arc::new(composite_frame::CompositeVideoFramePipeline::new(device))- };+ Arc::new(composite_frame::CompositeVideoFramePipeline::new(device));Self {background: BackgroundLayer::new(device),