Enum webrender::quad::QuadRenderStrategy
source · pub enum QuadRenderStrategy {
Direct,
Indirect,
NinePatch {
radius: LayoutVector2D,
clip_rect: LayoutRect,
},
Tiled {
x_tiles: u16,
y_tiles: u16,
},
}
Expand description
Describes how clipping affects the rendering of a quad primitive.
As a general rule, parts of the quad that require masking are prerendered in an intermediate target and the mask is applied using multiplicative blending to the intermediate result before compositing it into the destination target.
Each segment can opt in or out of masking independently.
Variants§
Direct
The quad is not affected by any mask and is drawn directly in the destination target.
Indirect
The quad is drawn entirely in an intermediate target and a mask is applied before compositing in the destination target.
NinePatch
A rounded rectangle clip is applied to the quad primitive via a nine-patch. The segments of the nine-patch that require a mask are rendered and masked in an intermediate target, while other segments are drawn directly in the destination target.
Tiled
Split the primitive into coarse tiles so that each tile independently has the opportunity to be drawn directly in the destination target or via an intermediate target if it is affected by a mask.
Trait Implementations§
source§impl Clone for QuadRenderStrategy
impl Clone for QuadRenderStrategy
source§fn clone(&self) -> QuadRenderStrategy
fn clone(&self) -> QuadRenderStrategy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for QuadRenderStrategy
impl Debug for QuadRenderStrategy
impl Copy for QuadRenderStrategy
Auto Trait Implementations§
impl Freeze for QuadRenderStrategy
impl RefUnwindSafe for QuadRenderStrategy
impl Send for QuadRenderStrategy
impl Sync for QuadRenderStrategy
impl Unpin for QuadRenderStrategy
impl UnwindSafe for QuadRenderStrategy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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>
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>
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