Struct x11rb_protocol::protocol::dbe::SwapBuffersRequest
source · pub struct SwapBuffersRequest<'input> {
pub actions: Cow<'input, [SwapInfo]>,
}
Expand description
Swaps front and back buffers.
Swaps the front and back buffers on the specified windows. The front and back buffers retain their ids, so that the window id continues to refer to the front buffer, while the back buffer id created by this extension continues to refer to the back buffer. Back buffer contents is moved to the front buffer. Back buffer contents after the operation depends on the given swap action. The optimal swap action depends on how each frame is rendered. For example, if the buffer is cleared and fully overwritten on every frame, the “untouched” action, which throws away the buffer contents, would provide the best performance. To eliminate visual artifacts, the swap will occure during the monitor VSync, if the X server supports detecting it.
§Fields
actions
- List of windows on which to swap buffers.
Fields§
§actions: Cow<'input, [SwapInfo]>
Implementations§
source§impl<'input> SwapBuffersRequest<'input>
impl<'input> SwapBuffersRequest<'input>
sourcepub fn serialize(self, major_opcode: u8) -> BufWithFds<[Cow<'input, [u8]>; 3]>
pub fn serialize(self, major_opcode: u8) -> BufWithFds<[Cow<'input, [u8]>; 3]>
Serialize this request into bytes for the provided connection
sourcepub fn try_parse_request(
header: RequestHeader,
value: &'input [u8]
) -> Result<Self, ParseError>
pub fn try_parse_request( header: RequestHeader, value: &'input [u8] ) -> Result<Self, ParseError>
Parse this request given its header, its body, and any fds that go along with it
sourcepub fn into_owned(self) -> SwapBuffersRequest<'static>
pub fn into_owned(self) -> SwapBuffersRequest<'static>
Clone all borrowed data in this SwapBuffersRequest.
Trait Implementations§
source§impl<'input> Clone for SwapBuffersRequest<'input>
impl<'input> Clone for SwapBuffersRequest<'input>
source§fn clone(&self) -> SwapBuffersRequest<'input>
fn clone(&self) -> SwapBuffersRequest<'input>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'input> Debug for SwapBuffersRequest<'input>
impl<'input> Debug for SwapBuffersRequest<'input>
source§impl<'input> Default for SwapBuffersRequest<'input>
impl<'input> Default for SwapBuffersRequest<'input>
source§fn default() -> SwapBuffersRequest<'input>
fn default() -> SwapBuffersRequest<'input>
source§impl<'de, 'input> Deserialize<'de> for SwapBuffersRequest<'input>
impl<'de, 'input> Deserialize<'de> for SwapBuffersRequest<'input>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl<'input> Hash for SwapBuffersRequest<'input>
impl<'input> Hash for SwapBuffersRequest<'input>
source§impl<'input> Ord for SwapBuffersRequest<'input>
impl<'input> Ord for SwapBuffersRequest<'input>
source§fn cmp(&self, other: &SwapBuffersRequest<'input>) -> Ordering
fn cmp(&self, other: &SwapBuffersRequest<'input>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<'input> PartialEq for SwapBuffersRequest<'input>
impl<'input> PartialEq for SwapBuffersRequest<'input>
source§fn eq(&self, other: &SwapBuffersRequest<'input>) -> bool
fn eq(&self, other: &SwapBuffersRequest<'input>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'input> PartialOrd for SwapBuffersRequest<'input>
impl<'input> PartialOrd for SwapBuffersRequest<'input>
source§fn partial_cmp(&self, other: &SwapBuffersRequest<'input>) -> Option<Ordering>
fn partial_cmp(&self, other: &SwapBuffersRequest<'input>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more