pub struct WideColor { /* private fields */ }Expand description
Immutable bounded-SDR color in linear Display P3/D65, with straight input alpha. Prepared textures store associated RGB/alpha and require a wide-capable host.
Native Metal and D3D11 window presentation accept this output when the host
has enabled WideGamutSdr. Windows native execution/display validation remains
outstanding. Other backends return an explicit preparation error.
Preparation allocates a texture; output caching/pooling is not provided yet.
Implementations§
Trait Implementations§
Source§impl CustomContent for WideColor
impl CustomContent for WideColor
Source§fn prepare(
&self,
backend: &dyn Any,
extent: Size<DevicePixels>,
) -> Result<Box<dyn Any>>
fn prepare( &self, backend: &dyn Any, extent: Size<DevicePixels>, ) -> Result<Box<dyn Any>>
Prepare content on the host device. Return an explicit error for unsupported backends.
Source§fn image_color_transform(&self) -> [[f32; 4]; 3]
fn image_color_transform(&self) -> [[f32; 4]; 3]
Encoded-sRGB RGB affine rows, applied after sampling/unassociation and
before coverage/opacity. Alpha is preserved. Identity keeps legacy output.
Source§fn image_source_size(&self) -> Option<Size<DevicePixels>>
fn image_source_size(&self) -> Option<Size<DevicePixels>>
Actual dimensions of an immutable source-sized texture. A large virtual
destination need not allocate a destination-sized preparation target.
Only valid for retained source-sized outputs, without geometry coverage.
Source§fn image_sample_opacity(&self) -> f32
fn image_sample_opacity(&self) -> f32
Sampling visibility independent of preparation. Zero permits warming a
source without compositing it over a progressive fallback.
Source§fn image_color_mode(&self) -> ImageColorMode
fn image_color_mode(&self) -> ImageColorMode
Source color interpretation and explicit output policy.
Source§fn image_linear_adjustments(&self) -> Option<LinearImagePaint>
fn image_linear_adjustments(&self) -> Option<LinearImagePaint>
Linear matrix and vignette in the declared working primaries.
Replaces encoded image_color_transform; does not change source identity.
Source§fn prepare_in_frame(
&self,
backend: &(dyn Any + 'static),
request: &PreparationRequest,
_frame: &PreparationFrame,
) -> Result<Box<dyn Any>, Error>
fn prepare_in_frame( &self, backend: &(dyn Any + 'static), request: &PreparationRequest, _frame: &PreparationFrame, ) -> Result<Box<dyn Any>, Error>
Prepare within shared scene-frame admission. Existing producers retain
their request-aware behavior without a new required implementation.
Source§fn prepare_with_request(
&self,
backend: &(dyn Any + 'static),
request: &PreparationRequest,
) -> Result<Box<dyn Any>, Error>
fn prepare_with_request( &self, backend: &(dyn Any + 'static), request: &PreparationRequest, ) -> Result<Box<dyn Any>, Error>
Prepare using logical geometry and the renderer’s exact raster extent.
Existing producers receive the same physical size through
prepare.
Request-aware producers may override this without changing submission.Auto Trait Implementations§
impl Forget for WideColor
impl Freeze for WideColor
impl Move for WideColor
impl RefUnwindSafe for WideColor
impl Send for WideColor
impl Sync for WideColor
impl Unpin for WideColor
impl UnsafeUnpin for WideColor
impl UnwindSafe for WideColor
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
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