pub struct SurfaceInfo {
pub width: u32,
pub height: u32,
pub scale: f32,
pub visible: bool,
pub display: SurfaceDisplay,
pub dynamic_range_limit: DynamicRangeLimit,
}Expand description
Where the elements showing a surface are, for a producer that renders at the painted size.
Fields§
§width: u32The largest element’s content box in physical pixels; 0 while no element shows the surface.
height: u32§scale: f32That element’s window scale factor.
visible: boolWhether any element showing it can be on screen. A hidden one takes no frames.
display: SurfaceDisplayThe display that element is on; the last one known while no element shows the surface.
dynamic_range_limit: DynamicRangeLimitThat element’s computed dynamic-range-limit.
Implementations§
Source§impl SurfaceInfo
impl SurfaceInfo
Sourcepub fn content_headroom(&self) -> f32
pub fn content_headroom(&self) -> f32
The brightest value a frame should reach, in SurfaceDisplay’s unit (1.0 is SDR white):
SurfaceDisplay::output_headroom as dynamic-range-limit allows it, for a producer that
tone-maps itself, such as a video player’s target peak.
Trait Implementations§
Source§impl Clone for SurfaceInfo
impl Clone for SurfaceInfo
Source§fn clone(&self) -> SurfaceInfo
fn clone(&self) -> SurfaceInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SurfaceInfo
Source§impl Debug for SurfaceInfo
impl Debug for SurfaceInfo
Source§impl Default for SurfaceInfo
impl Default for SurfaceInfo
Source§fn default() -> SurfaceInfo
fn default() -> SurfaceInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for SurfaceInfo
impl PartialEq for SurfaceInfo
impl StructuralPartialEq for SurfaceInfo
Auto Trait Implementations§
impl Forget for SurfaceInfo
impl Freeze for SurfaceInfo
impl Move for SurfaceInfo
impl RefUnwindSafe for SurfaceInfo
impl Send for SurfaceInfo
impl Sync for SurfaceInfo
impl Unpin for SurfaceInfo
impl UnsafeUnpin for SurfaceInfo
impl UnwindSafe for SurfaceInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
Converts
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> ⓘ
Converts
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