pub struct PreparationRequest { /* private fields */ }Expand description
Geometry needed to prepare an unclipped, local custom paint source.
Raster dimensions are chosen by the renderer after snapping. They need not equal logical dimensions multiplied by the window scale factor. Color, clipping, opacity and submission are not part of this request.
Implementations§
Source§impl PreparationRequest
impl PreparationRequest
Sourcepub fn new(
logical_size: Size<Pixels>,
raster_size: Size<DevicePixels>,
scale_factor: f32,
) -> Result<Self>
pub fn new( logical_size: Size<Pixels>, raster_size: Size<DevicePixels>, scale_factor: f32, ) -> Result<Self>
Construct a request with finite, positive dimensions and scale.
Sourcepub fn logical_size(&self) -> Size<Pixels>
pub fn logical_size(&self) -> Size<Pixels>
Full source size in logical GPUI pixels, before clipping or snapping.
Sourcepub fn raster_size(&self) -> Size<DevicePixels>
pub fn raster_size(&self) -> Size<DevicePixels>
Exact physical dimensions required for the prepared texture.
Sourcepub fn scale_factor(&self) -> f32
pub fn scale_factor(&self) -> f32
Window scale factor; use raster_size for texture allocation.
Trait Implementations§
Source§impl Clone for PreparationRequest
impl Clone for PreparationRequest
impl Copy for PreparationRequest
Source§impl Debug for PreparationRequest
impl Debug for PreparationRequest
Source§impl PartialEq for PreparationRequest
impl PartialEq for PreparationRequest
impl StructuralPartialEq for PreparationRequest
Auto Trait Implementations§
impl Freeze for PreparationRequest
impl RefUnwindSafe for PreparationRequest
impl Send for PreparationRequest
impl Sync for PreparationRequest
impl Unpin for PreparationRequest
impl UnsafeUnpin for PreparationRequest
impl UnwindSafe for PreparationRequest
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> 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