- tools/smoke.sh + tests/smoke/{launch,https,restore}.txt: hidden Xvfb run with a throwaway home
- vendor/epaint: render glyphs single-threaded (Servo enables vello_cpu/multithreading), D-006
- App::quit drops every Servo handle before the GL contexts, so Servo shuts down cleanly
- D-005: smoke runs use Xvfb
Co-Authored-By: Claude Opus 5.5 <[email protected]>
27 lines
832 B
Rust
27 lines
832 B
Rust
/// A cardinal direction, one of [`LeftToRight`](Direction::LeftToRight), [`RightToLeft`](Direction::RightToLeft), [`TopDown`](Direction::TopDown), [`BottomUp`](Direction::BottomUp).
|
|
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
|
pub enum Direction {
|
|
LeftToRight,
|
|
RightToLeft,
|
|
TopDown,
|
|
BottomUp,
|
|
}
|
|
|
|
impl Direction {
|
|
#[inline(always)]
|
|
pub fn is_horizontal(self) -> bool {
|
|
match self {
|
|
Self::LeftToRight | Self::RightToLeft => true,
|
|
Self::TopDown | Self::BottomUp => false,
|
|
}
|
|
}
|
|
|
|
#[inline(always)]
|
|
pub fn is_vertical(self) -> bool {
|
|
match self {
|
|
Self::LeftToRight | Self::RightToLeft => false,
|
|
Self::TopDown | Self::BottomUp => true,
|
|
}
|
|
}
|
|
}
|