pub struct BrowserSoftwareRenderTarget { /* private fields */ }Expand description
A canvas that is rendered to in memory, as the thread that draws to it holds it: each frame is drawn into a retained framebuffer and copied to the 2D context of the canvas through the object of the script side of that thread.
Upstream’s class is also the render surface of the canvas. Here the
surface is BrowserRenderSurface, which
both threads hold and which holds nothing of a thread; this object stays
in the table of the thread that renders
(get_render_target) and is what the surface
resolves there.
Implementations§
Source§impl BrowserSoftwareRenderTarget
impl BrowserSoftwareRenderTarget
Sourcepub fn new(js: JsObject) -> Rc<Self>
pub fn new(js: JsObject) -> Rc<Self>
Wraps the software render target of the script side.
The thread that calls this is the one the target belongs to.
Sourcepub fn create_framebuffer_render_target(
self: &Rc<Self>,
shared: Arc<BrowserSurfaceShared>,
) -> Rc<dyn IFramebufferRenderTarget>
pub fn create_framebuffer_render_target( self: &Rc<Self>, shared: Arc<BrowserSurfaceShared>, ) -> Rc<dyn IFramebufferRenderTarget>
Creates the framebuffer render target of the canvas. shared is
where each frame reads the size the canvas has to have.
Auto Trait Implementations§
impl Freeze for BrowserSoftwareRenderTarget
impl RefUnwindSafe for BrowserSoftwareRenderTarget
impl Send for BrowserSoftwareRenderTarget
impl Sync for BrowserSoftwareRenderTarget
impl Unpin for BrowserSoftwareRenderTarget
impl UnsafeUnpin for BrowserSoftwareRenderTarget
impl UnwindSafe for BrowserSoftwareRenderTarget
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
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