struct RootDamage {
id: Damage,
parts: Option<Region>,
reported: Cell<bool>,
}Expand description
The X server’s report that the root window changed, which lets a capture publish a change as
it lands instead of on the next tick. None where the server carries no DAMAGE extension,
leaving the frame timer to pace the capture by itself.
Reporting is one notification per non-empty region: the server stays quiet until the region
is subtracted, which is what Self::clear does to re-arm the next report.
Fields§
§id: Damage§parts: Option<Region>The XFixes region Self::take moves a report’s damage into, to read where the root
changed; None where the server’s XFixes has no regions.
reported: Cell<bool>A report read off the connection and not yet acted on. Latched here because reading the connection is what notices one, and that happens well before the frame it wakes.
Implementations§
Source§impl RootDamage
impl RootDamage
fn create(conn: &RustConnection, root: Window) -> Option<Self>
Sourcefn reported(&self, conn: &RustConnection) -> bool
fn reported(&self, conn: &RustConnection) -> bool
Whether the server has reported a change since the last Self::clear, taking in
whatever else the connection carries along the way.
Sourcefn clear(&self, conn: &RustConnection)
fn clear(&self, conn: &RustConnection)
Empty the region behind a report that has been acted on, so the next change is reported in turn; a tick nothing reported leaves the server alone. Called before a grab, which leaves a change racing the grab to wake the next frame instead of being cleared along with what the grab captured.
Sourcefn take(&self, conn: &RustConnection) -> Option<Vec<Rectangle>>
fn take(&self, conn: &RustConnection) -> Option<Vec<Rectangle>>
Self::clear, saying where the root changed: the damaged rectangles, empty where
nothing was reported, None where a change was reported but the server cannot say where.
Auto Trait Implementations§
impl !Freeze for RootDamage
impl !RefUnwindSafe for RootDamage
impl !Sync for RootDamage
impl Send for RootDamage
impl Unpin for RootDamage
impl UnsafeUnpin for RootDamage
impl UnwindSafe for RootDamage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more