pub struct RenderConfig {
pub debug: bool,
pub initial_width: u32,
pub initial_height: u32,
pub initial_dpr: [f32; 2],
/* private fields */
}Expand description
GPU resource sizing and initial surface configuration.
Fields§
§debug: bool§initial_width: u32§initial_height: u32§initial_dpr: [f32; 2]Implementations§
Source§impl RenderConfig
impl RenderConfig
Sourcepub fn new(_debug: bool, width: u32, height: u32, dpr: [f32; 2]) -> Self
pub fn new(_debug: bool, width: u32, height: u32, dpr: [f32; 2]) -> Self
Construct default buffer capacities for an initial surface size.
Sourcepub fn with_browser_premultiplied_alpha(self, enabled: bool) -> Self
pub fn with_browser_premultiplied_alpha(self, enabled: bool) -> Self
Request premultiplied browser canvas alpha for WebGPU surfaces.
wgpu’s web backend currently reports only Opaque alpha in surface capabilities, but its
configure path accepts PreMultiplied and maps it to GPUCanvasAlphaMode::Premultiplied.
Pax needs that for transparent browser-owned scroller islands.
Auto Trait Implementations§
impl Freeze for RenderConfig
impl RefUnwindSafe for RenderConfig
impl Send for RenderConfig
impl Sync for RenderConfig
impl Unpin for RenderConfig
impl UnsafeUnpin for RenderConfig
impl UnwindSafe for RenderConfig
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> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.