pub struct SurfaceSize {
pub width: u32,
pub height: u32,
pub scale: f64,
}Expand description
The surface dimensions a SceneFrame / RenderCommand carries — the
physical (device-pixel) swapchain size plus the HiDPI scale factor, so the
render thread can (re)configure the surface without consulting the UI
thread. Physical-at-the-boundary matches the render thread’s swapchain
needs (docs/CODE_STANDARDS.md’s physical-at-FFI, logical-inside rule).
Fields§
§width: u32Physical (device-pixel) width of the surface.
height: u32Physical (device-pixel) height of the surface.
scale: f64HiDPI scale factor (physical / logical), already sanitized by the
shell’s sanitize_scale at the FFI boundary.
Trait Implementations§
Source§impl Clone for SurfaceSize
impl Clone for SurfaceSize
impl Copy for SurfaceSize
Source§impl Debug for SurfaceSize
impl Debug for SurfaceSize
Source§impl PartialEq for SurfaceSize
impl PartialEq for SurfaceSize
impl StructuralPartialEq for SurfaceSize
Auto Trait Implementations§
impl Freeze for SurfaceSize
impl RefUnwindSafe for SurfaceSize
impl Send for SurfaceSize
impl Sync for SurfaceSize
impl Unpin for SurfaceSize
impl UnsafeUnpin for SurfaceSize
impl UnwindSafe for SurfaceSize
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.