gpui_linux/gpui_linux.rs
1#![cfg(any(target_os = "linux", target_os = "freebsd"))]
2mod linux;
3
4pub use linux::current_platform;
5
6/// The producer's half of the imported-texture path where wgpu is the renderer, which on Linux is the default one.
7/// Re-exported here for the same reason gpui_macos re-exports Metal's: this is the crate an
8/// application already reaches the platform through, so it does not have to know that the renderer
9/// lives in a crate of its own.
10#[cfg(any(feature = "wayland", feature = "x11"))]
11pub use gpui_wgpu::ImportedTextureExt;
12
13/// The headless renderer, so `gpui::current_headless_renderer` can build one on this platform the way
14/// it builds Metal's on macOS. The Linux platform owns no renderer of its own; wgpu is the renderer a
15/// window uses here, so a headless context renders through the same code.
16#[cfg(all(
17 feature = "gpui_wgpu",
18 any(feature = "bench-support", feature = "test-support")
19))]
20pub use gpui_wgpu::WgpuHeadlessRenderer;
21
22/// The Linux surface transport, re-exported so an application reaches it through the platform crate
23/// it already depends on rather than through the engine.
24#[cfg(target_os = "linux")]
25pub use gpui_engine::{DmaBufHandle, DmaBufPlane, SurfaceFormat};