pub enum BrowserRenderer {
Skia,
Vello,
}Expand description
The render backend a module draws with.
Not in the original, which has one backend. The rendering modes
(BrowserRenderingMode) keep their meaning with either: they say what
the canvas of a view is (the canvas of a WebGL context, a 2D canvas),
and the backend draws to it with what it has for that kind of canvas.
| mode | Skia | Vello |
|---|---|---|
WebGL2 | Ganesh | the hybrid mode (vello_gpu over the WebGL2 context) |
WebGL1 | Ganesh | not drawn: the mode is taken out of the list |
Software2D | Skia raster | the CPU mode (vello_cpu) |
Variants§
Skia
The Skia backend.
Vello
The Vello backend. The module has to be built with the feature
vello of this crate.
Implementations§
Source§impl BrowserRenderer
impl BrowserRenderer
Sourcepub fn parse(name: &str) -> Option<BrowserRenderer>
pub fn parse(name: &str) -> Option<BrowserRenderer>
The backend with the given name, ignoring case.
Sourcepub fn is_available(self) -> bool
pub fn is_available(self) -> bool
Whether the module was built with the backend.
Sourcepub fn rendering_modes(
self,
modes: &[BrowserRenderingMode],
) -> Vec<BrowserRenderingMode>
pub fn rendering_modes( self, modes: &[BrowserRenderingMode], ) -> Vec<BrowserRenderingMode>
The rendering modes of modes the backend draws, in their order.
The Vello backend has no renderer for WebGL 1; a list that asks for
nothing else is drawn in memory.
Trait Implementations§
Source§impl Clone for BrowserRenderer
impl Clone for BrowserRenderer
impl Copy for BrowserRenderer
Source§impl Debug for BrowserRenderer
impl Debug for BrowserRenderer
Source§impl Default for BrowserRenderer
impl Default for BrowserRenderer
impl Eq for BrowserRenderer
Source§impl Hash for BrowserRenderer
impl Hash for BrowserRenderer
Source§impl PartialEq for BrowserRenderer
impl PartialEq for BrowserRenderer
impl StructuralPartialEq for BrowserRenderer
Auto Trait Implementations§
impl Freeze for BrowserRenderer
impl RefUnwindSafe for BrowserRenderer
impl Send for BrowserRenderer
impl Sync for BrowserRenderer
impl Unpin for BrowserRenderer
impl UnsafeUnpin for BrowserRenderer
impl UnwindSafe for BrowserRenderer
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more