Struct runa_wayland_protocols::wayland::wl_surface::v6::requests::SetBufferScale
source · pub struct SetBufferScale {
pub scale: i32,
}
Expand description
sets the buffer scaling factor
This request sets an optional scaling factor on how the compositor interprets the contents of the buffer attached to the window.
Buffer scale is double-buffered state, see wl_surface.commit.
A newly created surface has its buffer scale set to 1.
wl_surface.set_buffer_scale changes the pending buffer scale. wl_surface.commit copies the pending buffer scale to the current one. Otherwise, the pending and current values are never changed.
The purpose of this request is to allow clients to supply higher resolution buffer data for use on high resolution outputs. It is intended that you pick the same buffer scale as the scale of the output that the surface is displayed on. This means the compositor can avoid scaling when rendering the surface on that output.
Note that if the scale is larger than 1, then you have to attach a buffer that is larger (by a factor of scale in each dimension) than the desired surface size.
If scale is not positive the invalid_scale protocol error is raised.
Fields§
§scale: i32
Implementations§
Trait Implementations§
source§impl Clone for SetBufferScale
impl Clone for SetBufferScale
source§fn clone(&self) -> SetBufferScale
fn clone(&self) -> SetBufferScale
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SetBufferScale
impl Debug for SetBufferScale
source§impl<'a> Deserialize<'a> for SetBufferScale
impl<'a> Deserialize<'a> for SetBufferScale
source§impl PartialEq<SetBufferScale> for SetBufferScale
impl PartialEq<SetBufferScale> for SetBufferScale
source§fn eq(&self, other: &SetBufferScale) -> bool
fn eq(&self, other: &SetBufferScale) -> bool
self
and other
values to be equal, and is used
by ==
.