Function fit_to_texture_limit
pub fn fit_to_texture_limit(
physical: (u32, u32),
device_scale: f64,
limit: u32,
) -> RenderExtentExpand description
A window of physical pixels at device_scale, drawn into a texture
no edge of which may exceed limit (the device’s
max_texture_dimension_2d).
A window that fits is drawn as it is. A larger one (a kiosk stretched over several displays: 2944 + 1920 logical pixels at scale 2 is 9728 wide, past the 8192 every device here is opened with) keeps its logical size and is drawn at the lower scale that fits; the compositor stretches the smaller buffer over the window, so it is softer, never missing or failing. Layout divides the extent by its scale and lands on the same logical size, within a pixel.