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
impl Copy for SurfaceInfo
Source§impl Debug for SurfaceInfo
impl Debug for SurfaceInfo
Source§impl Default for SurfaceInfo
impl Default for SurfaceInfo
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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